OMCompilerDoxygen
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Teuchos Namespace Reference

Namespaces

 details
 
 Details
 
 Exceptions
 
 MatrixMarket
 
 MixMaxUtilities
 
 PtrPrivateUtilityPack
 
 std
 
 TwoDDetails
 
 TypeTraits
 
 Utilities
 
 YAMLParameterList
 

Classes

class  AbstractArrayValidator
 An abstract base class for all ArrayValidators. More...
 
class  AbstractArrayValidatorXMLConverter
 
class  AbstractFactory
 Simple, universal "Abstract Factory" interface for the dynamic creation of objects. More...
 
class  AbstractFactoryStd
 Simple, templated concrete subclass of universal "Abstract Factory" interface for the creation of objects. More...
 
class  ActiveRCPNodesSetup
 Sets up node tracing and prints remaining RCPNodes on destruction. More...
 
class  AdditionFunction
 A simple function object that adds a specififed value from the given arguement in the runFunction function. More...
 
class  AdditionFunctionXMLConverter
 Class for converting AdditionFunction objects to and from XML. More...
 
class  AllocatorNew
 Default allocation policy class for AbstractFactoryStd which returns new T_impl(). More...
 
class  AndCondition
 A Bool Logic Condition that returns the result or perfroming a logical AND on the conditions. More...
 
class  AndConditionConverter
 An xml converter for AndConditions. More...
 
class  ANDValueReductionOp
 Standard logical AND operator for booleans. More...
 
class  any
 Modified boost::any class, which is a container for a templated value. More...
 
class  AnyNumberParameterEntryValidator
 Standard implementation of a ParameterEntryValidator that accepts numbers from a number of different formats and converts them to numbers in another format. More...
 
class  AnyNumberValidatorXMLConverter
 Converts AnyNumberParameterEntryValidators to and from XML. More...
 
class  AnyParameterEntryConverter
 A last resort converter for when no others will do. More...
 
class  ArcpReinterpretCastEmbeddedObj
 
class  Array
 Replacement for std::vector that is compatible with the Teuchos Memory Management classes. More...
 
class  ArrayArg
 Utility class that allows arrays to be passed into argument list. More...
 
class  ArrayFileNameValidator
 Convience class for FileNameValidators that are to be applied to arrays. More...
 
class  ArrayModifierDependency
 An abstract base class for all dependencies which modify the dimensional attributes of an Array parameter. More...
 
class  ArrayModifierDependencyXMLConverter
 A converter used to convert ArrayModifierDepdencies to and from xml. More...
 
class  ArrayNumberValidator
 Convience class for EnhancedNumberValidators that are to be applied to arrays. More...
 
class  ArrayRCP
 Reference-counted smart pointer for managing arrays. More...
 
class  ArrayRCP< const T >
 Partial specialization of ArrayRCP for const T. More...
 
class  ArrayRCP< const void >
 Dummy specialization of ArrayRCP<const void>. More...
 
class  ArrayRCP< void >
 Full specialization of ArrayRCP for T = void. More...
 
class  ArrayStringValidator
 Convience class for StringValidators that are to be applied to arrays. More...
 
class  ArrayValidator
 Takes a validator, wraps it, and applies it to an array. More...
 
class  ArrayValidatorXMLConverter
 Converts ArrayValidators to and from XML. More...
 
class  ArrayView
 Nonowning array view. More...
 
class  ArrayView< const T >
 Partial specialization of ArrayView for const T. More...
 
class  asFunc
 Function object wrapper for as(). More...
 
class  bad_any_cast
 Thrown if any_cast is attempted between two incompatable types. More...
 
class  BadParameterEntryXMLConverterTypeException
 Thrown when a converter is being used to convert either and XML tag or ParameterEntry with an innappropriate type. More...
 
class  BadParameterListElementException
 Thrown when an element inside a parameter list is bad. More...
 
class  BadTagException
 Thrown when xml tag is encountered that is either unrecognized or inappropriate for a given context. More...
 
class  BadValidatorXMLConverterException
 Thrown when a bad validator xml converter is used. More...
 
class  BadXMLParameterListRootElementException
 Thrown when the root xml tag for a parameter list is incorrect. More...
 
class  basic_FancyOStream
 std::ostream subclass that performs the magic of indenting data sent to an std::ostream object among other things. More...
 
class  basic_FancyOStream_buf
 Stream buffering class that performs the magic of indenting data sent to an std::ostream object. More...
 
class  basic_oblackholestream
 basic_ostream<> subclass that does nothing but discard output. More...
 
class  basic_OSTab
 Tabbing class for helping to create formated, indented output for a basic_FancyOStream object. More...
 
class  BLAS
 Templated BLAS wrapper. More...
 
class  BLAS< int, double >
 
class  BLAS< int, float >
 
class  BLAS< int, std::complex< double > >
 
class  BLAS< int, std::complex< float > >
 
class  BoolCondition
 A Bool Condition is a Parameter Condition that evaluates whether or not a Boolean parameter is ture. More...
 
class  BoolConditionConverter
 An xml converter for BoolConditions. More...
 
class  BoolLogicCondition
 An abstract parent class for all Bool Logic Conditions. More...
 
class  BoolLogicConditionConverter
 An xml converter for BoolLogicConditions. More...
 
class  BoolParameterEntryValidator
 Standard implementation of a BoolParameterEntryValidator that accepts bool values (true/false) or string values for bool ("true"/"false"). More...
 
class  BoolValidatorDependency
 A BoolValidatorDependency says the following about the relationship between two parameters: Dependening on the value of the dependee, the dependent should use a particular validator from a given set of validators. More...
 
class  BoolValidatorDependencyXMLConverter
 An xml converter for BoolValidatorDependencies. More...
 
class  BoolValidatorXMLConverter
 Converts BoolParameterEntryValidators to and from XML. More...
 
class  BoolVisualDependency
 A bool visual dependency says the following about the relationship between two elements in a Parameter List: Depending on whether or not the dependee is true or false, the dependent may or may not be displayed to the user in a GUI. More...
 
class  BoolVisualDependencyXMLConverter
 An xml converter for BoolVisualDepenencies. More...
 
class  CantFindConditionConverterException
 Thrown when an appropriate Condition Converter can't be found. More...
 
class  CantFindDependencyConverterException
 Thrown when an appropriate Dependency Converter can't be found. More...
 
class  CantFindFunctionObjectConverterException
 Thrown when an appropriate FunctionObject Converter can't be found. More...
 
class  CantFindParameterEntryConverterException
 Thrown when an appropriate ParameterEntryXMLConverter can't be found. More...
 
class  CantFindValidatorConverterException
 Thrown when the ValidatorXMLConverterDB can't find an appropriate converter. More...
 
class  CharToReferenceTypeReductionOp
 Decorator class that uses a strategy object to convert to and from char[] to typed buffers for objects that use reference semantics and then call a type-specific reduction object. More...
 
class  CharToValueTypeReductionOp
 Decorator class that uses traits to convert to and from char[] to typed buffers for objects that use value semantics and then call a type-specific reduction object. More...
 
class  CharToValueTypeReductionOp< Ordinal, T, typename DefaultSerializer< Ordinal, T >::DefaultSerializerType >
 Decorator class that uses traits to convert to and from char[] to typed buffers for objects that use value semantics and then call a type-specific reduction object. More...
 
class  CharToValueTypeReductionOpImp
 Decorator class that uses traits to convert to and from char[] to typed buffers for objects that use value semantics and then call a type-specific reduction object. More...
 
class  Comm
 Abstract interface for distributed-memory communication. More...
 
class  CommandLineProcessor
 Class that helps parse command line input arguments from (argc,argv[]) and set options. More...
 
class  CommRequest
 Encapsulation of a pending nonblocking communication operation. More...
 
class  CommStatus
 Encapsulation of the result of a receive (blocking or nonblocking). More...
 
class  CompileTimeAssert
 If instantiated (for Test!=0) then this should not compile! More...
 
class  CompileTimeAssert< 0 >
 If instantiated (i.e. Test==0) then this will compile! More...
 
struct  complex< T >>
 
class  CompObject
 Functionality and data that is common to all computational classes. More...
 
class  CompoundEntryWithParentheses
 An entry containing two subentries, with the second to be written in parentheses after the first. For example,. More...
 
class  Condition
 A Condition determines whether or not a particular set of conditions are currently occuring. More...
 
class  ConditionVisualDependency
 A condition visual dependency says the following about the relationship between elements in a Parameter List: Depending on whether or not the dependee(s) statisfy a particual condition, the dependent may or may not be displayed to the user in a UI. More...
 
class  ConditionVisualDependencyXMLConverter
 An xml converter for ConditionVisualDependencies. More...
 
class  ConditionXMLConverter
 An abstract base class for converting Dependencies to and from XML. More...
 
class  ConditionXMLConverterDB
 Provides ability to lookup ConditionXMLConverters. More...
 
class  ConstHandle
 Templated handle class with strong const protection. More...
 
class  ConstHandleable
 Class ConstHandleable provides an abstract interface for polymorphic conversion from raw pointers to const smart pointers. More...
 
class  ConstNonconstObjectContainer
 Simple class supporting the "runtime protection of const" idiom. More...
 
class  ConstReferenceTypeDeserializationBuffer
 Encapsulate how an array of onst objects with reference sematics is deserialized from a char[] array with memory being automatically freed at destruction time. More...
 
class  ConstReferenceTypeSerializationBuffer
 Encapsulate how an array of const objects with reference sematics is serialized into a char[] array. More...
 
class  ConstTypeTraits
 Traits class that strips 'const' off of a type. More...
 
class  ConstValueTypeDeserializationBuffer
 Encapsulate how an array of non-const serialized objects with value sematics stored in a char[] array is deserialized to a T[] array and then serialized back again. More...
 
class  ConstValueTypeDeserializationBuffer< Ordinal, T, typename DefaultSerializer< Ordinal, T >::DefaultSerializerType >
 Encapsulate how an array of non-const serialized objects with value sematics stored in a char[] array is deserialized to a T[] array and then serialized back again. More...
 
class  ConstValueTypeDeserializationBufferImp
 Encapsulate how an array of non-const serialized objects with value sematics stored in a char[] array is deserialized to a T[] array and then serialized back again. More...
 
class  ConstValueTypeDeserializationBufferImp< Ordinal, T, Serializer, false >
 Encapsulate how an array of non-const serialized objects with value sematics stored in a char[] array is deserialized to a T[] array and then serialized back again. More...
 
class  ConstValueTypeDeserializationBufferImp< Ordinal, T, Serializer, true >
 Encapsulate how an array of non-const serialized objects with value sematics stored in a char[] array is deserialized to a T[] array and then serialized back again. More...
 
class  ConstValueTypeSerializationBuffer
 Encapsulate how an array of const objects with value sematics is serialized into a const char[] array. More...
 
class  ConstValueTypeSerializationBuffer< Ordinal, T, typename DefaultSerializer< Ordinal, T >::DefaultSerializerType >
 Encapsulate how an array of const objects with value sematics is serialized into a const char[] array. More...
 
class  ConstValueTypeSerializationBufferImp
 Encapsulate how an array of const objects with value sematics is serialized into a const char[] array. More...
 
class  ConstValueTypeSerializationBufferImp< Ordinal, T, Serializer, false >
 Encapsulate how an array of const objects with value sematics is serialized into a const char[] array. More...
 
class  ConstValueTypeSerializationBufferImp< Ordinal, T, Serializer, true >
 Encapsulate how an array of const objects with value sematics is serialized into a const char[] array. More...
 
class  CWrapperErrorHandling
 Static C Wrapper Error Handling Policy Class. More...
 
class  DanglingReferenceError
 Dangling reference error exception class. More...
 
class  DeallocArrayDelete
 Deallocator class that uses delete [] to delete memory allocated uisng new [] More...
 
class  DeallocBoostSharedPtr
 Teuchos::RCP Deallocator class that wraps a boost::shared_ptr More...
 
class  DeallocDelete
 Policy class for deallocator that uses delete to delete a pointer which is used by RCP. More...
 
class  DeallocFunctorDelete
 Deallocator subclass that Allows any functor object (including a function pointer) to be used to free an object. More...
 
class  DeallocFunctorHandleDelete
 Deallocator subclass that Allows any functor object (including a function pointer) to be used to free a handle (i.e. pointer to pointer) to an object. More...
 
class  DeallocNull
 Policy class for deallocator for non-owned RCPs. More...
 
class  DeallocStdSharedPtr
 Teuchos::RCP Deallocator class that wraps a std::shared_ptr More...
 
class  DefaultBLASImpl
 Default implementation for BLAS routines. More...
 
class  DefaultComm
 Return a default global communicator appropriate for the build. More...
 
class  DefaultSerializer
 A class for instantiating a default serialization object. More...
 
class  Dependency
 This class represents a depndency between elements in a Parameter List. More...
 
class  DependencySheet
 A Dependency sheet keeps track of dependencies between various ParameterEntries. More...
 
class  DependencyXMLConverter
 An abstract base class for converting Dependencies to and from XML. More...
 
class  DependencyXMLConverterDB
 Provides ability to lookup DependencyXMLConverterDB. More...
 
class  Describable
 Base class for all objects that can describe themselves. More...
 
struct  DescribableStreamManipulatorState
 
class  DirectSerializationTraits
 Serialization traits for objects that support direct serialization. More...
 
class  DivisionFunction
 A simple function object that divides a specififed value from the given arguement in the runFunction function. More...
 
class  DivisionFunctionXMLConverter
 Class for converting DivisionFunction objects to and from XML. More...
 
class  DoubleEntry
 A table entry that is a simple double-precision number. More...
 
class  DummyObjectGetter
 Class for retrieving a dummy object of type T. More...
 
class  DummyObjectGetter< AndCondition >
 Specialized class for retrieving a dummy object of type AndCondition. More...
 
class  DummyObjectGetter< AnyNumberParameterEntryValidator >
 Specialized class for retrieving a dummy object of type AnyNumberParameterEntryValidator. More...
 
class  DummyObjectGetter< ArrayValidator< ValidatorType, EntryType > >
 Specialized class for retrieving a dummy object of type ArrayValidator. More...
 
class  DummyObjectGetter< BoolCondition >
 Specialized class for retrieving a dummy object of type BoolCondition. More...
 
class  DummyObjectGetter< BoolValidatorDependency >
 Specialized class for retrieving a dummy object of type BoolValidatorDependency. More...
 
class  DummyObjectGetter< BoolVisualDependency >
 Specialized class for retrieving a dummy object of type BoolVisualDependency. More...
 
class  DummyObjectGetter< ConditionVisualDependency >
 Specialized class for retrieving a dummy object of type ConditionVisualDependency. More...
 
class  DummyObjectGetter< EnhancedNumberValidator< T > >
 Specialized class for retrieving a dummy object of type EnhancedNumberValidator<T>. More...
 
class  DummyObjectGetter< EqualsCondition >
 Specialized class for retrieving a dummy object of type EqualsCondition. More...
 
class  DummyObjectGetter< FileNameValidator >
 Specialized class for retrieving a dummy object of type FileNameValidator. More...
 
class  DummyObjectGetter< NotCondition >
 Specialized class for retrieving a dummy object of type NotCondition. More...
 
class  DummyObjectGetter< NumberArrayLengthDependency< DependeeType, DependentType > >
 Specialized class for retrieving a dummy object of type NumberArrayLengthDependency. More...
 
class  DummyObjectGetter< NumberCondition< T > >
 Specialized class for retrieving a dummy object of type NumberCondition. More...
 
class  DummyObjectGetter< NumberVisualDependency< T > >
 Specialized class for retrieving a dummy object of type NumberVisualDependency. More...
 
class  DummyObjectGetter< OrCondition >
 Specialized class for retrieving a dummy object of type OrCondition. More...
 
class  DummyObjectGetter< RangeValidatorDependency< T > >
 Specialized class for retrieving a dummy object of type RangeValidatorDependency. More...
 
class  DummyObjectGetter< StringCondition >
 Specialized class for retrieving a dummy object of type StringCondition. More...
 
class  DummyObjectGetter< StringToIntegralParameterEntryValidator< IntegralType > >
 Specialized class for retrieving a dummy object of type StringToIntegralParameterEntryValidator<IntegralType>. More...
 
class  DummyObjectGetter< StringValidator >
 Specialized class for retrieving a dummy object of type StringValidator. More...
 
class  DummyObjectGetter< StringValidatorDependency >
 Specialized class for retrieving a dummy object of type StringValidatorDependency. More...
 
class  DummyObjectGetter< StringVisualDependency >
 Specialized class for retrieving a dummy object of type StringVisualDependency. More...
 
class  DummyObjectGetter< TwoDArrayValidator< ValidatorType, EntryType > >
 Specialized class for retrieving a dummy object of type TwoDArrayValidator. More...
 
class  DummyObjectGetter< TwoDColDependency< DependeeType, DependentType > >
 Specialized class for retrieving a dummy object of type TwoDColDependency. More...
 
class  DummyObjectGetter< TwoDRowDependency< DependeeType, DependentType > >
 Specialized class for retrieving a dummy object of type TwoDRowDependency. More...
 
class  DuplicateOwningRCPError
 Thrown if a duplicate owning RCP is creatd the the same object. More...
 
class  DuplicateParameterEntryException
 Thrown when a Parameter Entry that is already being tracked is attempted to be inserted again into the masterParameterEntryMap and masterIDMap. More...
 
class  DuplicateParameterEntryIDException
 Thrown when a Parameter Entry ID that is already being used is attempted to be reused again. More...
 
class  DuplicateParameterIDsException
 Thrown when two parameters in an XML file have the same ID. More...
 
class  DuplicateParameterSublist
 Optionally thrown when a sublist is set twice by either updateParametersFromXmlFile(), updateParametersFromXmlFileAndUpdate() or updateParametersFromXmlString() More...
 
class  DuplicateValidatorIDException
 Thrown when a ParameterEntryValidatorID that is already being used is attempted to be reused again. More...
 
class  DuplicateValidatorIDsException
 Constructs a CantFindParameterEntryConverterException. More...
 
class  EmbeddedObjDealloc
 A deallocator class that wraps a simple value object and delegates to another deallocator object. More...
 
class  EmptyXMLError
 Thrown when attempting to parse an empty XML std::string. More...
 
class  EnhancedNumberTraits
 Class defining the traits of the number type being used in an EnhancedNumberValidator. More...
 
class  EnhancedNumberTraits< __float128 >
 
class  EnhancedNumberTraits< double >
 
class  EnhancedNumberTraits< float >
 
class  EnhancedNumberTraits< int >
 
class  EnhancedNumberTraits< long int >
 
class  EnhancedNumberTraits< long long int >
 
class  EnhancedNumberTraits< long long unsigned int >
 
class  EnhancedNumberTraits< long unsigned int >
 
class  EnhancedNumberTraits< short int >
 
class  EnhancedNumberTraits< short unsigned int >
 
class  EnhancedNumberTraits< unsigned int >
 
class  EnhancedNumberValidator
 Class uesd to validate a particular type of number. More...
 
class  EnhancedNumberValidatorXMLConverter
 Converts EnhancedNumberValidators to and from XML. More...
 
class  EqualsCondition
 A Bool Logic Condition that returns the result or perfroming a logical EQUALS on the conditions. More...
 
class  EqualsConditionConverter
 An xml converter for EqualsConditions. More...
 
class  ExceptionBase
 Base exception class for Teuchos. More...
 
class  FileInputSource
 Instantiation of XMLInputSource class for reading XML from a file. More...
 
class  FileInputStream
 Instantiation of XMLInputStream class for reading an entire document from a file. More...
 
class  FileNameValidator
 Validate a file name entry. More...
 
class  FileNameValidatorXMLConverter
 Converts FileNameValidators to and from XML. More...
 
class  FILEstream
 Teuchos::FILEstream: Combined C FILE and C++ stream. More...
 
class  FilteredIterator
 C++ Standard Library compatable filtered iterator. More...
 
class  Flops
 The Teuchos Floating Point Operations Class. More...
 
class  Foo
 
class  FooA
 
class  FooB
 
class  FooC
 
class  FunctionObject
 A function object represents an arbitrary function. More...
 
class  FunctionObjectXMLConverter
 An abstract base class for converting FunctionObjects to and from XML. More...
 
class  FunctionObjectXMLConverterDB
 Provides ability to lookup FunctionObjectXMLConverters. More...
 
class  GetBaseObjVoidPtrImpl
 
class  GetBaseObjVoidPtrImpl< false, T >
 
class  GetBaseObjVoidPtrImpl< true, T >
 
class  GlobalMPISession
 Initialize, finalize, and query the global MPI session. More...
 
class  Handle
 Generic templated handle class. More...
 
class  Handleable
 Class Handleable provides an abstract interface for polymorphic conversion from raw pointers to smart pointers. More...
 
class  HashPair
 Helper class for Teuchos::Hashtable, representing a single <key, value> pair. More...
 
class  HashSet
 Templated hashtable-based set. More...
 
class  Hashtable
 Templated hashtable class. More...
 
class  HashUtils
 Utilities for generating hashcodes. This is not a true hash ! For all ints and types less than ints it returns the i/p typecasted as an int. For every type more than the size of int it is only slightly more smarter where it adds the bits into int size chunks and calls that an hash. Used with a capacity limited array this will lead to one of the simplest hashes. Ideally this should be deprecated and not used at all. More...
 
class  IDtoValidatorMap
 Maps Validators to integers. More...
 
class  IncompatibleIteratorsError
 Incompatiable iterators error exception class. More...
 
class  IntEntry
 A table entry that is a simple integer. More...
 
class  InvalidArrayStringRepresentation
 
class  InvalidConditionException
 
class  InvalidDependencyException
 
class  LabeledObject
 Base class for objects that contain a std::string label. More...
 
class  LAPACK
 The Templated LAPACK Wrapper Class. More...
 
class  LAPACK< int, __float128 >
 
class  LAPACK< int, double >
 
class  LAPACK< int, float >
 
class  LAPACK< int, std::complex< double > >
 
class  LAPACK< int, std::complex< float > >
 
class  m_bad_cast
 Exception class for bad cast. More...
 
class  MaxLoc
 Teuchos version of MPI_MAXLOC. More...
 
class  MaxLoc< Ordinal, double, int >
 
class  MaxValueReductionOp
 Standard Max operator for types with value semantics. More...
 
class  MinLoc
 Teuchos version of MPI_MINLOC. More...
 
class  MinLoc< Ordinal, double, int >
 
class  MinLocNonzero
 same as MinLoc, but don't allow zero More...
 
class  MinLocNonzero< Ordinal, double, int >
 
class  MinValueReductionOp
 Standard min operator for types with value semantics. More...
 
class  MissingConditionTagException
 Thrown when no condtion tag is found when converting a ConditionVisualDependency from XML. More...
 
class  MissingDependeeException
 Thrown when no dependes of a dependency can't be found when converting the dependency to or from XML. More...
 
class  MissingDependeesException
 Thrown when no dependess of a dependency are specified when converting the dependency from XML. More...
 
class  MissingDependentException
 Thrown when a dependent of a dependency cant be found when converting the dependency to or from XML. More...
 
class  MissingDependentsException
 Thrown when no dependents of a dependency are specified when converting the dependency from XML. More...
 
class  MissingParameterEntryDefinitionException
 Thrown when a referenced ParameterEntry can't be found. More...
 
class  MissingRangesAndValidatorsTagException
 Thrown when the rangesAndValidators tag for the RangeValidatorDepencyConverter can't be found. More...
 
class  MissingValidatorDefinitionException
 Thrown when a referenced validator can't be found. More...
 
class  MissingValidatorException
 Thrown when converting a dependency that has validaotrs to and from XML. This excetpion indicates that a specified validator could not be found. More...
 
class  MissingValuesAndValidatorsTagException
 Thrown when converting a StrinvValidatorDependcny from XML and no valuesAndValidators tag is found. More...
 
class  MissingValuesTagException
 Thrown when a StringConditon is missing it's Value tag. More...
 
class  MockRCP
 
class  MpiComm
 Implementation of Comm that uses MPI for communication. More...
 
class  MpiCommRequest
 MPI implementation of CommRequest. More...
 
class  MpiCommRequestBase
 Base class MPI implementation of CommRequest. More...
 
class  MpiCommStatus
 MPI-specific implementation of CommStatus. More...
 
class  MPITraits
 Templated traits class that binds MPI types to C++ types. More...
 
class  MPITraits< char >
 
class  MPITraits< double >
 
class  MPITraits< float >
 
class  MPITraits< int >
 
class  MultiplicationFunction
 A simple function object that multiplys a specififed value from the given arguement in the runFunction function. More...
 
class  MultiplicationFunctionXMLConverter
 Class for converting MultiplicationFunction objects to and from XML. More...
 
class  NoNameAttributeExecption
 Thrown when a parameter entry tag is missing it's name attribute. More...
 
class  NonconstAccessError
 Null reference error exception class. More...
 
class  NotCondition
 A Not condition returns the result of performing a logical NOT on a given condition. More...
 
class  NotConditionConverter
 An xml converter for NotConditions. More...
 
class  NoTypeAttributeExecption
 Thrown when a parameter entry tag is missing it's type attribute. More...
 
class  NoValueAttributeExecption
 Thrown when a parameter entry tag is missing it's value attribute. More...
 
class  NullIteratorTraits
 Base traits class for getting a properly initialized null pointer. More...
 
class  NullIteratorTraits< ArrayRCP< T > >
 Traits specialization for ArrayRCP. More...
 
class  NullIteratorTraits< RCP< T > >
 Traits specialization for RCP. More...
 
class  NullIteratorTraits< std::reverse_iterator< Iter > >
 Partial specialization for std::reverse_iterator. More...
 
class  NullReferenceError
 Null reference error exception class. More...
 
class  NumberArrayLengthDependency
 A NumberArrayLengthDependency says the following about the relationship between two parameters: The length of the dependent's array depends on the value of the dependee. More...
 
class  NumberArrayLengthDependencyXMLConverter
 An xml converter for NumberArrayLengthDependencies. More...
 
class  NumberCondition
 A Number Condition is a Parameter Condition that evaluates whether or not a number parameter is greater than 0 (or some other number based on a given function). If the parameter is greater than 0 this is interperted as the condition being "true". Otherwise the oncidiont is interperted as false. More...
 
class  NumberConditionConverter
 An xml converter for NumberConditions The valid XML represntation for a NumberCondition is: More...
 
class  NumberVisualDependency
 A number visual dependency says the following about the relationship between two elements in a Parameter List: Depending on whether or not the dependee has a certain value, the dependent may or may not be displayed to the user in a UI. More...
 
class  NumberVisualDependencyXMLConverter
 An xml converter for NumberVisualDependencies. More...
 
class  Object
 The base Teuchos class. More...
 
class  ObjectBuilder
 Generic parameterlist driven bulider class. More...
 
class  OpaqueWrapper
 Base class for wrapped opaque objects. More...
 
class  OpaqueWrapperWithFree
 Subclass for wrapped opaque objects with a free function. More...
 
class  OrCondition
 A Bool Logic Condition that returns the result or perfroming a logical OR on the conditions. More...
 
class  OrConditionConverter
 An xml converter for OrConditions. More...
 
struct  OrdinalTraits
 This structure defines some basic traits for the ordinal field type. More...
 
struct  OrdinalTraits< __int64 >
 
struct  OrdinalTraits< char >
 
struct  OrdinalTraits< int >
 
struct  OrdinalTraits< long int >
 
struct  OrdinalTraits< long long int >
 
struct  OrdinalTraits< long unsigned int >
 
struct  OrdinalTraits< short int >
 
struct  OrdinalTraits< unsigned __int64 >
 
struct  OrdinalTraits< unsigned int >
 
struct  OrdinalTraits< unsigned long long int >
 
class  ParameterCondition
 An Abstract Base class for all ParameterConditions. More...
 
class  ParameterConditionConverter
 An xml converter for ParameterConditions. More...
 
class  ParameterEntry
 This object is held as the "value" in the Teuchos::ParameterList std::map. More...
 
class  ParameterEntryValidator
 Abstract interface for an object that can validate a ParameterEntry's value. More...
 
class  ParameterEntryXMLConverter
 A class used to convert parameter entries to xml and vice versa. More...
 
class  ParameterEntryXMLConverterDB
 Provides ability to lookup ParameterEntryXMLConverters. More...
 
class  ParameterList
 A list of parameters of arbitrary type. More...
 
class  ParameterListAcceptor
 Interface for objects that can accept a ParameterList. More...
 
class  ParameterListAcceptorDefaultBase
 Intermediate node base class for objects that accept parameter lists that implements some of the needed behavior automatically. More...
 
class  ParameterListNonAcceptor
 Mix-in implementation subclass to be inherited by concrete subclasses who's interface says that they take a parameter list but do not have any parameters yet. More...
 
class  ParameterXMLFileReader
 
class  PerformanceMonitorBase
 Common capabilities for collecting and reporting performance data across processors. More...
 
class  Polynomial
 Lightweight container class to represent a simple polynomial. More...
 
class  PolynomialTraits
 Traits class for polynomial coefficients in Teuchos::Polynomial. More...
 
class  PostModNothing
 Default post-modification policy class for AbstractFactorStd which does nothing! More...
 
class  PromotionTraits
 
class  PromotionTraits< T, T >
 
class  Ptr
 Simple wrapper class for raw pointers to single objects where no persisting relationship exists. More...
 
class  Range1D
 Subregion Index Range Class. More...
 
class  RangeError
 Range error exception class. More...
 
class  RangeValidatorDependency
 A RangeValidatorDependency says the following about the relationship between two parameters: Dependening on the value of the dependee, the dependent should use a particular validator from a given set of validators. More...
 
class  RangeValidatorDependencyXMLConverter
 An xml converter for RangeValidatorDependencies. More...
 
class  RawPointerConversionTraits
 
class  RawPointerConversionTraits< ArrayRCP< T > >
 
class  RawPointerConversionTraits< RawType * >
 
class  RawWorkspace
 Encapulsation object for raw temporary workspace that has been allocated. These objects can only be created on the stack and should not be included as the member of any other classes. More...
 
class  RCP
 Smart reference counting pointer class for automatic garbage collection. More...
 
struct  RCPComp
 Struct for comparing two RCPs. Simply compares the raw pointers contained within the RCPs. More...
 
struct  RCPConstComp
 Struct for comparing two RCPs. Simply compares the raw pointers contained within the RCPs. More...
 
class  RCPDeleter
 boost::shared_ptr deleter class that wraps a Teuchos::RCP. More...
 
class  RCPNode
 Node class to keep track of address and the reference count for a reference-counted utility class and delete the object. More...
 
class  RCPNodeHandle
 Handle class that manages the RCPNode's reference counting. More...
 
class  RCPNodeThrowDeleter
 Deletes a (non-owning) RCPNode but not it's underlying object in case of a throw. More...
 
class  RCPNodeTmpl
 Templated implementation class of RCPNode that has the responsibility for deleting the reference-counted object. More...
 
class  RCPNodeTracer
 Debug-mode RCPNode tracing class. More...
 
class  ReferenceTypeDeserializationBuffer
 Encapsulate how an array of non-const objects with reference sematics is deserialized from a char[] array and then serialized back into the char[] buffer again. More...
 
class  ReferenceTypeReductionOp
 Base interface class for user-defined reduction operations for objects that use reference semantics. More...
 
class  ReferenceTypeSerializationBuffer
 Encapsulate how an array of non-const objects with reference sematics is serialized into a char[] array and deserialized again. More...
 
class  RelErrSmallNumber
 
class  RelErrSmallNumber< false, Scalar >
 
class  RelErrSmallNumber< true, Scalar >
 
struct  ScalarTraits
 This structure defines some basic traits for a scalar field type. More...
 
struct  ScalarTraits< __float128 >
 
struct  ScalarTraits< __int64 >
 
struct  ScalarTraits< char >
 
struct  ScalarTraits< dd_real >
 
struct  ScalarTraits< double >
 
struct  ScalarTraits< float >
 
struct  ScalarTraits< int >
 
struct  ScalarTraits< long int >
 
struct  ScalarTraits< long long int >
 
struct  ScalarTraits< long unsigned int >
 
struct  ScalarTraits< mp_real >
 
struct  ScalarTraits< mpf_class >
 
struct  ScalarTraits< qd_real >
 
struct  ScalarTraits< short int >
 
struct  ScalarTraits< std::pair< Packet, Packet > >
 
struct  ScalarTraits< unsigned __int64 >
 
struct  ScalarTraits< unsigned int >
 
struct  ScalarTraits< unsigned long long int >
 
struct  ScalarTraits< unsigned short int >
 
class  ScopedThreadLock
 Stack-based object for locking a thread. More...
 
class  SerialBandDenseMatrix
 This class creates and provides basic support for banded dense matrices of templated type. More...
 
class  SerialBandDenseSolver
 A class for representing and solving banded dense linear systems. More...
 
class  SerialComm
 Concrete serial communicator subclass. More...
 
class  SerialCommStatus
 Implementation of CommStatus for a serial communicator. More...
 
class  SerialDenseMatrix
 This class creates and provides basic support for dense rectangular matrix of templated type. More...
 
class  SerialDenseSolver
 A class for solving dense linear problems. More...
 
class  SerialDenseVector
 This class creates and provides basic support for dense vectors of templated type as a specialization of Teuchos::SerialDenseMatrix. Additional methods for the SerialDenseVector class, like mathematical methods, can be found documented in SerialDenseMatrix. More...
 
class  SerializationTraits
 Serialization traits class for types T that use value semantics. More...
 
class  SerializationTraits< Ordinal, __float128 >
 
class  SerializationTraits< Ordinal, char >
 
class  SerializationTraits< Ordinal, dd_real >
 
class  SerializationTraits< Ordinal, double >
 
class  SerializationTraits< Ordinal, float >
 
class  SerializationTraits< Ordinal, int >
 
class  SerializationTraits< Ordinal, long int >
 
class  SerializationTraits< Ordinal, long long int >
 
class  SerializationTraits< Ordinal, ptrdiff_t >
 
class  SerializationTraits< Ordinal, qd_real >
 
class  SerializationTraits< Ordinal, short int >
 
class  SerializationTraits< Ordinal, signed char >
 
class  SerializationTraits< Ordinal, size_t >
 
class  SerializationTraits< Ordinal, std::complex< double > >
 
class  SerializationTraits< Ordinal, std::complex< float > >
 
class  SerializationTraits< Ordinal, std::pair< P1, P2 > >
 
class  SerializationTraits< Ordinal, unsigned char >
 
class  SerializationTraits< Ordinal, unsigned int >
 
class  SerializationTraits< Ordinal, unsigned long int >
 
class  SerializationTraits< Ordinal, unsigned long long int >
 
class  SerializationTraits< Ordinal, unsigned short int >
 
class  Serializer
 Strategy interface for the indirect serializing and deserializing objects of a given type handled using reference semantics. More...
 
class  SerialQRDenseSolver
 A class for solving dense linear problems. More...
 
class  SerialSpdDenseSolver
 A class for constructing and using Hermitian positive definite dense matrices. More...
 
class  SerialSymDenseMatrix
 This class creates and provides basic support for symmetric, positive-definite dense matrices of templated type. More...
 
class  SerialTriDiMatrix
 This class creates and provides basic support for TriDi matrix of templated type. More...
 
class  SetTracingActiveNodesStack
 
class  SharedAccessPolicy
 Single policy class defining an approach for sharing an integral object across threads as well as a general heavy-weight locking policy. More...
 
class  SimpleFunctionObject
 A simple function object that applies a given operand to a spcified arguement using a specific operator. More...
 
class  SimpleFunctionXMLConverter
 An xml converter for SimpleFunctionObjects. More...
 
class  SimpleObjectDB
 Simple object object database. More...
 
class  SimpleObjectTable
 This class provides a central place to store objects. More...
 
class  StandardTemplatedParameterConverter
 A standard ParameterEntryXMLConverter for most data types. More...
 
class  StdSharedPtrRCPDeleter
 std::shared_ptr deleter class that wraps a Teuchos::RCP. More...
 
class  StringCondition
 A String Condition is a Parameter Condition that evaluates whether or not a string parameter has taken on a particular value or set of values. More...
 
class  StringConditionConverter
 An xml converter for StringConditions The valid XML represntation for a StringCondition is: More...
 
class  StringEntry
 A table entry that is a simple std::string. More...
 
class  StringIndexedOrderedValueObjectContainer
 String indexed ordered value-type object container class. More...
 
class  StringIndexedOrderedValueObjectContainerBase
 Base types for StringIndexedOrderedValueObjectContainer. More...
 
class  StringInputSource
 Instantiation of XMLInputSource class for reading XML from a std::string. More...
 
class  StringInputStream
 Instantiation of XMLInputStream for reading an entire document from a std::string. More...
 
class  StringToIntegralParameterEntryValidator
 Standard implementation of a ParameterEntryValidator that maps from a list of strings to an enum or integer value. More...
 
class  StringToIntegralValidatorXMLConverter
 Convert a StringToIntegralParameterEntryValidator to and from XML. More...
 
class  StringToIntMap
 Map a std::string to an enumeration. More...
 
class  StringValidator
 A simple validator that only allows certain string values to be choosen or simply enforces that a particular parameter have a std::string for a value. More...
 
class  StringValidatorDependency
 A StringValidatorDependency says the following about the relationship between two parameters: Dependening on the value of the dependee, the dependent should use a particular validator from a given set of validators. More...
 
class  StringValidatorDependencyXMLConverter
 An xml converter for StringValidatorDependencies. More...
 
class  StringValidatorXMLConverter
 Converts StringValidators to and from XML. More...
 
class  StringVisualDependency
 A string visual depdencies says the following about the relationship between two elements in a Parameter List: Depending on whether or not the dependee has a particular value, the dependent may or may not be displayed to the user in a UI. More...
 
class  StringVisualDependencyXMLConverter
 An xml converter for StringVisualDepenencies. More...
 
class  StrUtils
 Provides std::string manipulation utilities that are not provided in the standard C++ std::string class. More...
 
class  SubtractionFunction
 A simple function object that subtracts a specififed value from the given arguement in the runFunction function. More...
 
class  SubtractionFunctionXMLConverter
 Class for converting SubtractionFunction objects to and from XML. More...
 
class  SumValueReductionOp
 Standard summation operator for types with value semantics. More...
 
class  TableColumn
 
class  TableEntry
 An entry, perhaps compound, to be written into a table. More...
 
class  TableFormat
 Encapsulation of formatting specifications for writing data in a clean tabular form. More...
 
class  TabularOutputter
 Utility class that makes it easy to create formatted tables of output. More...
 
class  ThreadLock
 Basic portable thread lock primative class. More...
 
class  Time
 Wall-clock timer. More...
 
class  TimeMonitor
 A scope-safe timer wrapper class, that can compute global timer statistics. More...
 
class  TimeMonitorSurrogateImpl
 Implementation of TimeMonitorSurrogate that invokes TimeMonitor. More...
 
class  TimeMonitorSurrogateImplInserter
 Injects run-time dependency of a class on TimeMonitor. More...
 
class  TooManyDependeesException
 Thrown when a Dependency has too many dependees specified in its XML. More...
 
class  ToStringTraits
 Default traits class for converting objects into strings. More...
 
class  ToStringTraits< __float128 >
 Partial specialization for __float128. More...
 
class  ToStringTraits< bool >
 Specialization for bool. More...
 
class  ToStringTraits< double >
 Specialization for double. More...
 
class  ToStringTraits< ERCPStrength >
 Traits class specialization for toString(...) function for converting from ERCPStrength to std::string. More...
 
class  ToStringTraits< float >
 Specialization for float. More...
 
class  ToStringTraits< std::pair< T1, T2 > >
 Partial specialization for std::pair<T1, T2>. More...
 
class  ToStringTraits< std::string >
 Specialization for std::string. More...
 
class  TreeBuildingXMLHandler
 TreeBuildingXMLHandler assembles a XMLObject from your XML input. More...
 
class  Tuple
 Statically sized simple array (tuple) class. More...
 
class  TwoDArray
 A thin wrapper around the Array class which causes it to be interpurted as a 2D Array. More...
 
class  TwoDArrayFileNameValidator
 Convience class for FileNameValidators that are to be applied to TwoDArrays. More...
 
class  TwoDArrayModifierDependency
 A dependency in which some attribute of a TwoDArray in a parameter depends on the value of another parameter. More...
 
class  TwoDArrayNumberValidator
 Convience class for EnhancedNumberValidators that are to be applied to TwoDArray. More...
 
class  TwoDArrayStringValidator
 Convience class for StringValidators that are to be applied to TwoDArrays. More...
 
class  TwoDArrayValidator
 Takes a validator, wraps it, and applies it to a TwoDArray. More...
 
class  TwoDArrayValidatorXMLConverter
 Converts TwoDArrayValidators to and from XML. More...
 
class  TwoDColDependency
 A dependency in which the number of rows in a parameter with a TwoDArray depends on the value of another parameter. More...
 
class  TwoDColDependencyXMLConverter
 A class for converting TwoDColDependencies to and from XML. More...
 
class  TwoDRowDependency
 A dependency in which the number of rows in a parameter with a TwoDArray depends on the value of another parameter. More...
 
class  TwoDRowDependencyXMLConverter
 A class for converting TwoDRowDependencies to and from XML. More...
 
class  TypeNameTraits
 Default traits class that just returns typeid(T).name(). More...
 
class  TypeNameTraits< Array< T > >
 TypeNameTraits specialization for Array. More...
 
class  TypeNameTraits< Opaque3_handle >
 
class  TypeNameTraits< ParameterList >
 Traits specialization. More...
 
class  TypeNameTraits< std::complex< T > >
 
class  TypeNameTraits< std::string >
 
class  TypeNameTraits< T *>
 
class  TypeNameTraits< TwoDArray< T > >
 TypeNameTraits specialization for Array. More...
 
class  TypeNameTraits< UndefinedType2 >
 
class  TypeNameTraits< void *>
 
class  TypeNameTraits< void >
 
class  UNDEFINED_PARAMETERENTRY_VALIDATOR
 
struct  UndefinedEnhancedNumberTraits
 Default structure used by EnhancedNumberTraits<T> to produce a compile time error when the specialization does not exist for type T. More...
 
struct  UndefinedLAPACKRoutine
 
struct  UndefinedOrdinalTraits
 
struct  UndefinedScalarTraits
 
class  UndefinedSerializationTraits
 Report an error if a specialization of SerializationTraits is missing. More...
 
class  UnitTestBase
 Unit test base class. More...
 
struct  UnitTestData
 
class  UnitTestRepository
 Singleton unit testing repository. More...
 
class  Utils
 This class provides some basic std::string and floating-point utilities for Teuchos. More...
 
class  ValidatorDependency
 An abstract base class for all validator dependencies. More...
 
class  ValidatorDependencyXMLConverter
 An xml converter for ValidatorDependencies. More...
 
class  ValidatorFactory
 Factory for ParameterEntryValidator objects. More...
 
class  ValidatortoIDMap
 A class for mapping validators to integers. More...
 
class  ValidatorXMLConverter
 An abstract base class for converting ParameterEntryValidators to and from XML. More...
 
class  ValidatorXMLConverterDB
 Provides ability to lookup ValidatorXMLConverterDB. More...
 
class  ValuesTagMissingException
 Thrown when a StringVisualDependency is being converted from XML and no Values tag is found. More...
 
struct  ValueTolerance
 ValueTolerance is a struct to keep a tuple of value and a tolerance. The tolerance can be either expressed as a relative or through an upper and lower bound. More...
 
class  ValueTypeConversionTraits
 Default traits class for all conversions between value types. More...
 
class  ValueTypeConversionTraits< dd_real, long unsigned int >
 Convert long unsigned int to dd_real. More...
 
class  ValueTypeConversionTraits< dd_real, qd_real >
 Convert qd_real to dd_real. More...
 
class  ValueTypeConversionTraits< double, dd_real >
 Convert dd_real to double. More...
 
class  ValueTypeConversionTraits< double, long double >
 Convert from long double to double. More...
 
class  ValueTypeConversionTraits< double, qd_real >
 Convert qd_real to double. More...
 
class  ValueTypeConversionTraits< double, std::string >
 Convert an std::string to a double. More...
 
class  ValueTypeConversionTraits< float, dd_real >
 Convert dd_real to float. More...
 
class  ValueTypeConversionTraits< float, double >
 Convert from double to float. More...
 
class  ValueTypeConversionTraits< float, long double >
 Convert from long double to float. More...
 
class  ValueTypeConversionTraits< float, long long >
 Convert from long long to float. More...
 
class  ValueTypeConversionTraits< float, qd_real >
 Convert qd_real to float. More...
 
class  ValueTypeConversionTraits< float, std::string >
 Convert an std::string to a float. More...
 
class  ValueTypeConversionTraits< float, unsigned long long >
 Convert from unsigned long long to float. More...
 
class  ValueTypeConversionTraits< int, dd_real >
 Convert dd_real to int. More...
 
class  ValueTypeConversionTraits< int, double >
 Convert from double to int. More...
 
class  ValueTypeConversionTraits< int, float >
 Convert from float to int. More...
 
class  ValueTypeConversionTraits< int, long >
 Convert from long to int. More...
 
class  ValueTypeConversionTraits< int, long long >
 Convert from long long to int. More...
 
class  ValueTypeConversionTraits< int, qd_real >
 Convert qd_real to int. More...
 
class  ValueTypeConversionTraits< int, std::string >
 Convert an std::string to an int. More...
 
class  ValueTypeConversionTraits< int, unsigned int >
 Convert from unsigned int to int. More...
 
class  ValueTypeConversionTraits< int, unsigned long >
 Convert from unsigned long to int. More...
 
class  ValueTypeConversionTraits< int, unsigned long long >
 Convert from unsigned long long to int. More...
 
class  ValueTypeConversionTraits< long double, std::string >
 Convert an std::string to a long double. More...
 
class  ValueTypeConversionTraits< long long, double >
 Convert from double to long long. More...
 
class  ValueTypeConversionTraits< long long, float >
 Convert from float to long long. More...
 
class  ValueTypeConversionTraits< long long, std::string >
 Convert an std::string to a long long. More...
 
class  ValueTypeConversionTraits< long long, unsigned long long >
 Convert from unsigned long long to long long. More...
 
class  ValueTypeConversionTraits< long, double >
 Convert from double to long. More...
 
class  ValueTypeConversionTraits< long, float >
 Convert from float to long. More...
 
class  ValueTypeConversionTraits< long, std::string >
 Convert an std::string to a long. More...
 
class  ValueTypeConversionTraits< long, unsigned int >
 Convert from unsigned int to long. More...
 
class  ValueTypeConversionTraits< long, unsigned long >
 Convert from unsigned long to long. More...
 
class  ValueTypeConversionTraits< OutType, std::string >
 Convert an std::string to a type OutType. More...
 
class  ValueTypeConversionTraits< qd_real, long unsigned int >
 Convert long unsigned int to qd_real. More...
 
class  ValueTypeConversionTraits< short, double >
 Convert from double to short. More...
 
class  ValueTypeConversionTraits< short, float >
 Convert from float to short. More...
 
class  ValueTypeConversionTraits< short, int >
 Convert from int to short. More...
 
class  ValueTypeConversionTraits< short, long >
 Convert from long to short. More...
 
class  ValueTypeConversionTraits< short, std::string >
 Convert an std::string to a short. More...
 
class  ValueTypeConversionTraits< short, unsigned short >
 Convert from unsigned short to short. More...
 
class  ValueTypeConversionTraits< std::complex< RealType >, int >
 Convert int to std::complex<RealType>, for any RealType. More...
 
class  ValueTypeConversionTraits< std::complex< RealType >, long >
 Convert long to std::complex<RealType>, for any RealType. More...
 
class  ValueTypeConversionTraits< std::complex< RealType >, long long >
 Convert long long to std::complex<RealType>, for any RealType. More...
 
class  ValueTypeConversionTraits< std::complex< RealType >, short >
 Convert short to std::complex<RealType>, for any RealType. More...
 
class  ValueTypeConversionTraits< std::complex< RealType >, unsigned int >
 Convert unsigned int to std::complex<RealType>, for any RealType. More...
 
class  ValueTypeConversionTraits< std::complex< RealType >, unsigned long >
 Convert unsigned long to std::complex<RealType>, for any RealType. More...
 
class  ValueTypeConversionTraits< std::complex< RealType >, unsigned long long >
 Convert unsigned long long to std::complex<RealType>, for any RealType. More...
 
class  ValueTypeConversionTraits< std::complex< RealType >, unsigned short >
 Convert unsigned short to std::complex<RealType>, for any RealType. More...
 
class  ValueTypeConversionTraits< std::pair< Packet, Packet >, ConvertToPacket >
 
class  ValueTypeConversionTraits< std::string, char[N]>
 Convert raw C string to std::string. More...
 
class  ValueTypeConversionTraits< unsigned __int64, std::string >
 Convert an std::string to an unsigned __int64. More...
 
class  ValueTypeConversionTraits< unsigned int, double >
 Convert from double to unsigned int. More...
 
class  ValueTypeConversionTraits< unsigned int, float >
 Convert from float to unsigned int. More...
 
class  ValueTypeConversionTraits< unsigned int, int >
 Convert from int to unsigned int. More...
 
class  ValueTypeConversionTraits< unsigned int, long >
 Convert from long to unsigned int. More...
 
class  ValueTypeConversionTraits< unsigned int, long long >
 Convert from long long to unsigned int. More...
 
class  ValueTypeConversionTraits< unsigned int, std::string >
 Convert an std::string to an unsigned int. More...
 
class  ValueTypeConversionTraits< unsigned int, unsigned long >
 Convert from unsigned long to unsigned int. More...
 
class  ValueTypeConversionTraits< unsigned int, unsigned long long >
 Convert from unsigned long long to unsigned int. More...
 
class  ValueTypeConversionTraits< unsigned long long, double >
 Convert from double to unsigned long long. More...
 
class  ValueTypeConversionTraits< unsigned long long, float >
 Convert from float to unsigned long long. More...
 
class  ValueTypeConversionTraits< unsigned long long, long long >
 Convert from long long to unsigned long long. More...
 
class  ValueTypeConversionTraits< unsigned long long, std::string >
 Convert an std::string to an unsigned long long. More...
 
class  ValueTypeConversionTraits< unsigned long, double >
 Convert from double to unsigned long. More...
 
class  ValueTypeConversionTraits< unsigned long, float >
 Convert from float to unsigned long. More...
 
class  ValueTypeConversionTraits< unsigned long, long >
 Convert from long to unsigned long. More...
 
class  ValueTypeConversionTraits< unsigned long, std::string >
 Convert an std::string to an unsigned long. More...
 
class  ValueTypeConversionTraits< unsigned short, double >
 Convert from double to unsigned short. More...
 
class  ValueTypeConversionTraits< unsigned short, float >
 Convert from float to unsigned short. More...
 
class  ValueTypeConversionTraits< unsigned short, short >
 Convert from short to unsigned short. More...
 
class  ValueTypeConversionTraits< unsigned short, std::string >
 Convert an std::string to an unsigned short. More...
 
class  ValueTypeConversionTraits< unsigned short, unsigned long >
 Convert from unsigned long to unsigned short. More...
 
class  ValueTypeDeserializationBuffer
 Encapsulate how an array of non-const serialized objects with value sematics stored in a char[] array is deserialized to a T[] array and then serialized back again. More...
 
class  ValueTypeDeserializationBuffer< Ordinal, T, typename DefaultSerializer< Ordinal, T >::DefaultSerializerType >
 Encapsulate how an array of non-const serialized objects with value sematics stored in a char[] array is deserialized to a T[] array and then serialized back again. More...
 
class  ValueTypeDeserializationBufferImp
 Encapsulate how an array of non-const serialized objects with value sematics stored in a char[] array is deserialized to a T[] array and then serialized back again. More...
 
class  ValueTypeDeserializationBufferImp< Ordinal, T, Serializer, false >
 Encapsulate how an array of non-const serialized objects with value sematics stored in a char[] array is deserialized to a T[] array and then serialized back again. More...
 
class  ValueTypeDeserializationBufferImp< Ordinal, T, Serializer, true >
 Encapsulate how an array of non-const serialized objects with value sematics stored in a char[] array is deserialized to a T[] array and then serialized back again. More...
 
class  ValueTypeReductionOp
 Base interface class for user-defined reduction operations for objects that use value semantics. More...
 
class  ValueTypeSerializationBuffer
 Encapsulate how an array of non-const objects with value sematics is serialized into a char[] array. More...
 
class  ValueTypeSerializationBuffer< Ordinal, T, typename DefaultSerializer< Ordinal, T >::DefaultSerializerType >
 Encapsulate how an array of non-const objects with value sematics is serialized into a char[] array. More...
 
class  ValueTypeSerializationBufferImp
 Encapsulate how an array of non-const objects with value sematics is serialized into a char[] array. More...
 
class  ValueTypeSerializationBufferImp< Ordinal, T, Serializer, false >
 Encapsulate how an array of non-const objects with value sematics is serialized into a char[] array. More...
 
class  ValueTypeSerializationBufferImp< Ordinal, T, Serializer, true >
 Encapsulate how an array of non-const objects with value sematics is serialized into a char[] array. More...
 
class  ValueTypeSerializer
 Serialization class for types T that use value semantics. More...
 
class  VerboseObject
 Templated base class for objects that can print their activities to a stream and have a verbosity level. More...
 
class  VerboseObjectBase
 Non-templated base class for objects that can print their activities to a stream. More...
 
class  VerboseObjectTempState
 Set and release a stream and verbosity level. More...
 
class  VisualDependency
 An abstract parent class for all visual dependencies. More...
 
class  VisualDependencyXMLConverter
 An xml converter for VisualDepenencies. More...
 
class  Workspace
 Templated class for workspace creation. More...
 
class  WorkspaceStore
 Workspace encapsulation class. More...
 
class  WorkspaceStoreInitializeable
 WorkspaceStore class that can be used to actually reinitialize memory. More...
 
class  XMLInputSource
 XMLInputSource represents a source of XML input that can be parsed to produce an XMLObject. More...
 
class  XMLInputStream
 XMLInputStream represents an XML input stream that can be used by a XMLInputSource. More...
 
class  XMLObject
 Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object, allowing storage by reference. More...
 
class  XMLObjectImplem
 The XMLObjectImplem class takes care of the low-level implementation details of XMLObject. More...
 
class  XMLParameterListReader
 Writes an XML object to a parameter list. More...
 
class  XMLParameterListWriter
 Writes a ParameterList to an XML object. More...
 
class  XMLParser
 XMLParser consumes characters from an XMLInputStream object, parsing the XML and using a TreeBuildingXMLHandler to construct an XMLObject. More...
 
class  XMLTestNode
 Subclass of XMLObject used by the performance archive. More...
 

Typedefs

typedef std::map< std::string, std::pair< double, int > > timer_map_t
 
typedef std::map< std::string, std::vector< std::pair< double, double > > > stat_map_type
 Global statistics collected from timer data. More...
 
typedef Teuchos_Ordinal Ordinal
 
typedef basic_FancyOStream< charFancyOStream
 
typedef basic_OSTab< charOSTab
 
typedef basic_oblackholestream< char, std::char_traits< char > > oblackholestream
 
typedef unsigned int uint
 
typedef unsigned short ushort
 
typedef unsigned long ulong
 
typedef unsigned long long int ullint
 
typedef std::string myString_t
 
typedef long long int llint
 

Enumerations

enum  EReductionType
 Predefined reduction operations that Teuchos::Comm understands. More...
 
enum  ECounterSetOp { Intersection, Union }
 Set operation type for mergeCounterNames() to perform. More...
 
enum  ENull
 Used to initialize a RCP object to NULL using an implicit conversion! More...
 
enum  ERCPWeakNoDealloc { RCP_WEAK_NO_DEALLOC }
 
enum  ERCPUndefinedWeakNoDealloc { RCP_UNDEFINED_WEAK_NO_DEALLOC }
 
enum  ERCPUndefinedWithDealloc { RCP_UNDEFINED_WITH_DEALLOC }
 
enum  EPrePostDestruction { PRE_DESTROY, POST_DESTROY }
 Used to specify a pre or post destruction of extra data. More...
 
enum  ERCPStrength { RCP_STRONG =0, RCP_WEAK =1 }
 Used to specify if the pointer is weak or strong. More...
 
enum  ERCPNodeLookup { RCP_ENABLE_NODE_LOOKUP, RCP_DISABLE_NODE_LOOKUP }
 Used to determine if RCPNode lookup is performed or not. More...
 
enum  EShowTestDetails { SHOW_TEST_DETAILS_ALL, SHOW_TEST_DETAILS_TEST_NAMES, SHOW_TEST_DETAILS_FINAL_RESULTS }
 
enum  EVerbosityLevel {
  VERB_DEFAULT =-1, VERB_NONE =0, VERB_LOW =1, VERB_MEDIUM =2,
  VERB_HIGH =3, VERB_EXTREME =4
}
 Verbosity level. More...
 
enum  ESide { LEFT_SIDE, RIGHT_SIDE }
 
enum  ETransp { NO_TRANS, TRANS, CONJ_TRANS }
 
enum  EUplo { UPPER_TRI, LOWER_TRI, UNDEF_TRI }
 
enum  EDiag { UNIT_DIAG, NON_UNIT_DIAG }
 
enum  EType {
  FULL, LOWER, UPPER, HESSENBERG,
  SYM_BAND_L, SYM_BAND_U, BAND
}
 
enum  DataAccess { Copy, View }
 
enum  EValidateUsed
 Validation used enum. More...
 
enum  EValidateDefaults
 Validation defaults enum. More...
 
enum  PerfTestResult {
  PerfTestFailed, PerfTestPassed, PerfTestNewMachine, PerfTestNewConfiguration,
  PerfTestNewTest, PerfTestNewTestConfiguration, PerfTestUpdatedTest
}
 ReturnValues for PerfTest_CheckOrAdd_Test. More...
 

Functions

template<>
void reduceAll< int, std::complex< double > > (const Comm< int > &comm, const EReductionType reductType, const int count, const std::complex< double > sendBuffer[], std::complex< double > globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, std::complex< double > > (const Comm< int > &comm, const ArrayRCP< std::complex< double > > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, std::complex< double > > (const ArrayRCP< std::complex< double > > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, std::complex< double > > (const Comm< int > &comm, const int count, const std::complex< double > sendBuffer[], const int destRank)
 
template<>
void send< int, std::complex< double > > (const std::complex< double > sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const std::complex< double > > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void reduceAll< int, std::complex< float > > (const Comm< int > &comm, const EReductionType reductType, const int count, const std::complex< float > sendBuffer[], std::complex< float > globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, std::complex< float > > (const Comm< int > &comm, const ArrayRCP< std::complex< float > > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, std::complex< float > > (const ArrayRCP< std::complex< float > > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, std::complex< float > > (const Comm< int > &comm, const int count, const std::complex< float > sendBuffer[], const int destRank)
 
template<>
void send< int, std::complex< float > > (const std::complex< float > sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const std::complex< float > > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void reduceAll< int, double > (const Comm< int > &comm, const EReductionType reductType, const int count, const double sendBuffer[], double globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, double > (const Comm< int > &comm, const ArrayRCP< double > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, double > (const ArrayRCP< double > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, double > (const Comm< int > &comm, const int count, const double sendBuffer[], const int destRank)
 
template<>
void send< int, double > (const double sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const double > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void reduceAll< int, float > (const Comm< int > &comm, const EReductionType reductType, const int count, const float sendBuffer[], float globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, float > (const Comm< int > &comm, const ArrayRCP< float > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, float > (const ArrayRCP< float > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, float > (const Comm< int > &comm, const int count, const float sendBuffer[], const int destRank)
 
template<>
void send< int, float > (const float sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const float > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void gather< int, long long > (const long long sendBuf[], const int sendCount, long long recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
void gatherv< int, long long > (const long long sendBuf[], const int sendCount, long long recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
void reduceAll< int, long long > (const Comm< int > &comm, const EReductionType reductType, const int count, const long long sendBuffer[], long long globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, long long > (const Comm< int > &comm, const ArrayRCP< long long > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, long long > (const ArrayRCP< long long > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, long long > (const Comm< int > &comm, const int count, const long long sendBuffer[], const int destRank)
 
template<>
void send< int, long long > (const long long sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const long long > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void gather< int, unsigned long long > (const unsigned long long sendBuf[], const int sendCount, unsigned long long recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
void gatherv< int, unsigned long long > (const unsigned long long sendBuf[], const int sendCount, unsigned long long recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
void reduceAll< int, unsigned long long > (const Comm< int > &comm, const EReductionType reductType, const int count, const unsigned long long sendBuffer[], unsigned long long globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, unsigned long long > (const Comm< int > &comm, const ArrayRCP< unsigned long long > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, unsigned long long > (const ArrayRCP< unsigned long long > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, unsigned long long > (const Comm< int > &comm, const int count, const unsigned long long sendBuffer[], const int destRank)
 
template<>
void send< int, unsigned long long > (const unsigned long long sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const unsigned long long > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void gather< int, long > (const long sendBuf[], const int sendCount, long recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
void gatherv< int, long > (const long sendBuf[], const int sendCount, long recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
void reduceAll< int, long > (const Comm< int > &comm, const EReductionType reductType, const int count, const long sendBuffer[], long globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, long > (const Comm< int > &comm, const ArrayRCP< long > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, long > (const ArrayRCP< long > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, long > (const Comm< int > &comm, const int count, const long sendBuffer[], const int destRank)
 
template<>
void send< int, long > (const long sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const long > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void gather< int, unsigned long > (const unsigned long sendBuf[], const int sendCount, unsigned long recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
void gatherv< int, unsigned long > (const unsigned long sendBuf[], const int sendCount, unsigned long recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
void reduceAll< int, unsigned long > (const Comm< int > &comm, const EReductionType reductType, const int count, const unsigned long sendBuffer[], unsigned long globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, unsigned long > (const Comm< int > &comm, const ArrayRCP< unsigned long > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, unsigned long > (const ArrayRCP< unsigned long > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, unsigned long > (const Comm< int > &comm, const int count, const unsigned long sendBuffer[], const int destRank)
 
template<>
void send< int, unsigned long > (const unsigned long sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const unsigned long > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void gather< int, int > (const int sendBuf[], const int sendCount, int recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
void gatherv< int, int > (const int sendBuf[], const int sendCount, int recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
void scatter< int, int > (const int sendBuf[], const int sendCount, int recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
void reduce< int, int > (const int sendBuf[], int recvBuf[], const int count, const EReductionType reductType, const int root, const Comm< int > &comm)
 
template<>
void reduceAll< int, int > (const Comm< int > &comm, const EReductionType reductType, const int count, const int sendBuffer[], int globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, int > (const Comm< int > &comm, const ArrayRCP< int > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, int > (const ArrayRCP< int > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, int > (const Comm< int > &comm, const int count, const int sendBuffer[], const int destRank)
 
template<>
void send< int, int > (const int sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const int > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void gather< int, unsigned int > (const unsigned int sendBuf[], const int sendCount, unsigned int recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
void gatherv< int, unsigned int > (const unsigned int sendBuf[], const int sendCount, unsigned int recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
void reduceAll< int, unsigned int > (const Comm< int > &comm, const EReductionType reductType, const int count, const unsigned int sendBuffer[], unsigned int globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, unsigned int > (const Comm< int > &comm, const ArrayRCP< unsigned int > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, unsigned int > (const ArrayRCP< unsigned int > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, unsigned int > (const Comm< int > &comm, const int count, const unsigned int sendBuffer[], const int destRank)
 
template<>
void send< int, unsigned int > (const unsigned int sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const unsigned int > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void gather< int, short > (const short sendBuf[], const int sendCount, short recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
void gatherv< int, short > (const short sendBuf[], const int sendCount, short recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
void reduceAll< int, short > (const Comm< int > &comm, const EReductionType reductType, const int count, const short sendBuffer[], short globalReducts[])
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, short > (const Comm< int > &comm, const ArrayRCP< short > &recvBuffer, const int sourceRank)
 
template<>
RCP< Teuchos::CommRequest< int > > ireceive< int, short > (const ArrayRCP< short > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
void send< int, short > (const Comm< int > &comm, const int count, const short sendBuffer[], const int destRank)
 
template<>
void send< int, short > (const short sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
RCP< Teuchos::CommRequest< int > > isend (const ArrayRCP< const short > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
void reduceAll< int, char > (const Comm< int > &comm, const EReductionType reductType, const int count, const char sendBuffer[], char globalReducts[])
 
template<typename Ordinal , typename Packet >
TEUCHOS_DEPRECATED void reduceAll (const Comm< Ordinal > &comm, const EReductionType reductType, const Packet &send, Packet *globalReduct)
 Deprecated . More...
 
template<typename Ordinal , typename Packet >
TEUCHOS_DEPRECATED void scan (const Comm< Ordinal > &comm, const EReductionType reductType, const Packet &send, Packet *scanReduct)
 Deprecated. More...
 
template<typename Ordinal , typename Packet >
void send (const Packet sendBuffer[], const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
 Variant of send() that takes a tag (and restores the correct order of arguments). More...
 
template<typename Ordinal , typename Packet >
void ssend (const Packet sendBuffer[], const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
 Variant of ssend() that takes a tag (and restores the correct order of arguments). More...
 
template<typename Ordinal , typename Packet >
void readySend (const Packet sendBuffer[], const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
 Variant of readySend() that accepts a message tag. More...
 
template<typename Ordinal , typename Packet >
RCP< CommRequest< Ordinal > > isend (const ArrayRCP< const Packet > &sendBuffer, const int destRank, const int tag, const Comm< Ordinal > &comm)
 Variant of isend() that takes a tag (and restores the correct order of arguments). More...
 
template<typename Ordinal , typename Packet >
RCP< CommRequest< Ordinal > > ireceive (const ArrayRCP< Packet > &recvBuffer, const int sourceRank, const int tag, const Comm< Ordinal > &comm)
 Variant of ireceive that takes a tag argument (and restores the correct order of arguments). More...
 
template<typename Ordinal , typename Packet >
ValueTypeReductionOp< Ordinal, Packet > * createOp (const EReductionType reductType)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, std::complex< double > > (const Comm< int > &comm, const EReductionType reductType, const int count, const std::complex< double > sendBuffer[], std::complex< double > globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, std::complex< double > > (const Comm< int > &comm, const ArrayRCP< std::complex< double > > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, std::complex< double > > (const ArrayRCP< std::complex< double > > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, std::complex< double > > (const Comm< int > &comm, const int count, const std::complex< double > sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, std::complex< double > > (const std::complex< double > sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, std::complex< double > > (const ArrayRCP< const std::complex< double > > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, std::complex< float > > (const Comm< int > &comm, const EReductionType reductType, const int count, const std::complex< float > sendBuffer[], std::complex< float > globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, std::complex< float > > (const Comm< int > &comm, const ArrayRCP< std::complex< float > > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, std::complex< float > > (const ArrayRCP< std::complex< float > > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, std::complex< float > > (const Comm< int > &comm, const int count, const std::complex< float > sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, std::complex< float > > (const std::complex< float > sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, std::complex< float > > (const ArrayRCP< const std::complex< float > > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, double > (const Comm< int > &comm, const EReductionType reductType, const int count, const double sendBuffer[], double globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, double > (const Comm< int > &comm, const ArrayRCP< double > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, double > (const ArrayRCP< double > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, double > (const Comm< int > &comm, const int count, const double sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, double > (const double sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, double > (const ArrayRCP< const double > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, float > (const Comm< int > &comm, const EReductionType reductType, const int count, const float sendBuffer[], float globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, float > (const Comm< int > &comm, const ArrayRCP< float > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, float > (const ArrayRCP< float > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, float > (const Comm< int > &comm, const int count, const float sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, float > (const float sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, float > (const ArrayRCP< const float > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gather< int, long long > (const long long sendBuf[], const int sendCount, long long recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gatherv< int, long long > (const long long sendBuf[], const int sendCount, long long recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, long long > (const Comm< int > &comm, const EReductionType reductType, const int count, const long long sendBuffer[], long long globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, long long > (const Comm< int > &comm, const ArrayRCP< long long > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, long long > (const ArrayRCP< long long > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, long long > (const Comm< int > &comm, const int count, const long long sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, long long > (const long long sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, long long > (const ArrayRCP< const long long > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gather< int, unsigned long long > (const unsigned long long sendBuf[], const int sendCount, unsigned long long recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gatherv< int, unsigned long long > (const unsigned long long sendBuf[], const int sendCount, unsigned long long recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, unsigned long long > (const Comm< int > &comm, const EReductionType reductType, const int count, const unsigned long long sendBuffer[], unsigned long long globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, unsigned long long > (const Comm< int > &comm, const ArrayRCP< unsigned long long > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, unsigned long long > (const ArrayRCP< unsigned long long > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, unsigned long long > (const Comm< int > &comm, const int count, const unsigned long long sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, unsigned long long > (const unsigned long long sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, unsigned long long > (const ArrayRCP< const unsigned long long > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gather< int, long > (const long sendBuf[], const int sendCount, long recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gatherv< int, long > (const long sendBuf[], const int sendCount, long recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, long > (const Comm< int > &comm, const EReductionType reductType, const int count, const long sendBuffer[], long globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, long > (const Comm< int > &comm, const ArrayRCP< long > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, long > (const ArrayRCP< long > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, long > (const Comm< int > &comm, const int count, const long sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, long > (const long sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, long > (const ArrayRCP< const long > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gather< int, unsigned long > (const unsigned long sendBuf[], const int sendCount, unsigned long recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gatherv< int, unsigned long > (const unsigned long sendBuf[], const int sendCount, unsigned long recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, unsigned long > (const Comm< int > &comm, const EReductionType reductType, const int count, const unsigned long sendBuffer[], unsigned long globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, unsigned long > (const Comm< int > &comm, const ArrayRCP< unsigned long > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, unsigned long > (const ArrayRCP< unsigned long > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, unsigned long > (const Comm< int > &comm, const int count, const unsigned long sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, unsigned long > (const unsigned long sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, unsigned long > (const ArrayRCP< const unsigned long > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gather< int, int > (const int sendBuf[], const int sendCount, int recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gatherv< int, int > (const int sendBuf[], const int sendCount, int recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void scatter (const int sendBuf[], const int sendCount, int recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduce< int, int > (const int sendBuf[], int recvBuf[], const int count, const EReductionType reductType, const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, int > (const Comm< int > &comm, const EReductionType reductType, const int count, const int sendBuffer[], int globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, int > (const Comm< int > &comm, const ArrayRCP< int > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, int > (const ArrayRCP< int > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, int > (const Comm< int > &comm, const int count, const int sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, int > (const int sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, int > (const ArrayRCP< const int > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gather< int, unsigned int > (const unsigned int sendBuf[], const int sendCount, unsigned int recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gatherv< int, unsigned int > (const unsigned int sendBuf[], const int sendCount, unsigned int recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, unsigned int > (const Comm< int > &comm, const EReductionType reductType, const int count, const unsigned int sendBuffer[], unsigned int globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, unsigned int > (const Comm< int > &comm, const ArrayRCP< unsigned int > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, unsigned int > (const ArrayRCP< unsigned int > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, unsigned int > (const Comm< int > &comm, const int count, const unsigned int sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, unsigned int > (const unsigned int sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, unsigned int > (const ArrayRCP< const unsigned int > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gather< int, short > (const short sendBuf[], const int sendCount, short recvBuf[], const int recvCount, const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void gatherv< int, short > (const short sendBuf[], const int sendCount, short recvBuf[], const int recvCounts[], const int displs[], const int root, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, short > (const Comm< int > &comm, const EReductionType reductType, const int count, const short sendBuffer[], short globalReducts[])
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, short > (const Comm< int > &comm, const ArrayRCP< short > &recvBuffer, const int sourceRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > ireceive< int, short > (const ArrayRCP< short > &recvBuffer, const int sourceRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, short > (const Comm< int > &comm, const int count, const short sendBuffer[], const int destRank)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void send< int, short > (const short sendBuffer[], const int count, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP< CommRequest< int > > isend< int, short > (const ArrayRCP< const short > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
 
template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void reduceAll< int, char > (const Comm< int > &comm, const EReductionType reductType, const int count, const char sendBuffer[], char globalReducts[])
 
std::string mpiErrorCodeToString (const int err)
 Human-readable string version of the given MPI error code. More...
 
template<typename Ordinal , typename T >
void dumpBuffer (const std::string &funcName, const std::string &buffName, const Ordinal bytes, const T buff[])
 
template<class OrdinalType >
RCP< MpiCommStatus< OrdinalType > > mpiCommStatus (MPI_Status rawMpiStatus)
 
template<class OrdinalType >
RCP< MpiCommRequest< OrdinalType > > mpiCommRequest (MPI_Request rawMpiRequest, const ArrayView< char >::size_type numBytes)
 
const chartoString (const EReductionType reductType)
 
void mergeCounterNames (const Comm< int > &comm, const Array< std::string > &localNames, Array< std::string > &globalNames, const ECounterSetOp setOp)
 Merge counter names over all processors. More...
 
 TEUCHOS_UNIT_TEST (Teuchos_ParameterList, xmlUpdateAndBroadcast)
 
 TEUCHOS_UNIT_TEST (Teuchos_ParameterList, xmlUpdateAndBroadcastNoOverWrite)
 
 TEUCHOS_UNIT_TEST (TimeMonitor, FUNC_TIME_MONITOR)
 
 TEUCHOS_UNIT_TEST (TimeMonitor, enableTimer)
 
 TEUCHOS_UNIT_TEST (TimeMonitor, YamlLabelQuoting)
 
 TEUCHOS_UNIT_TEST (TimeMonitor, TimerLabelFiltering)
 
 TEUCHOS_UNIT_TEST (TimeMonitor, FUNC_TIME_MONITOR_tested)
 
 TEUCHOS_UNIT_TEST (TimeMonitor, SUMMARIZE_diffTimerSets)
 
 TEUCHOS_UNIT_TEST (TimeMonitor, FILTER_ZERO_TIMERS_sameParallelCallCounts)
 
 TEUCHOS_UNIT_TEST (TimeMonitor, FILTER_ZERO_TIMERS_differentParallelCallCounts)
 
 TEUCHOS_UNIT_TEST (TimeMonitor, IgnoreMissingTimers)
 
 TEUCHOS_UNIT_TEST (UnitTestHarness, nonRootFails)
 
 TEUCHOS_UNIT_TEST (UnitTestHarness, nonRootThrowsTeuchosExcept)
 
 TEUCHOS_UNIT_TEST (UnitTestHarness, nonRootThrowsIntExcept)
 
template<class ArrayPtrT_in , class T_out >
void arrayViewPtrConv (const ArrayPtrT_in &a_in, const ArrayView< Ptr< T_out > > &a_out)
 Utility function to convert from an an input Array[View,RCP]<[const] PTR<T_in> > object to an output ArrayView<Ptr<T_out> > object. More...
 
template<class ArrayPtrT_in , class T_out >
void arrayViewRcpConv (const ArrayPtrT_in &a_in, const ArrayView< RCP< T_out > > &a_out)
 Utility function to convert from an input Array[View,RCP]<[const] RCP<T_in> > object to an output ArrayView<RCP<T_out> > object. More...
 
template<class T_out , class ArrayPtrT_in >
Array< Ptr< T_out > > arrayPtrConv (const ArrayPtrT_in &a_in)
 Utility function to convert an Array[View,RCP]<[const] PTR<T_in> > object to an Array<Ptr<T_out> > object. More...
 
template<class T_out , class ArrayPtrT_in >
Array< RCP< T_out > > arrayRcpConv (const ArrayPtrT_in &a_in)
 Utility function to convert any Array[View,RCP]<[const] RCP<T_in> > object to an Array<RCP<T_out> > object. More...
 
template<class T >
ArrayView< const Ptr< const T > > arrayConstPtrConstCast (const ArrayView< const Ptr< T > > &a_in)
 Utility function that does a reinterpret case to convert an ArrayView<const Ptr<T> > object to an ArrayView<const Ptr<const T> > object. More...
 
template<class T >
ArrayView< const RCP< const T > > arrayConstRcpConstCast (const ArrayView< const RCP< T > > &a_in)
 Utility function that does a reinterpret case to convert an ArrayView<const RCP<T> > object to an ArrayView<const RCP<const T> > object. More...
 
template<class T >
RCPNodeArrayRCP_createNewRCPNodeRawPtr (T *p, bool has_ownership_in)
 
template<class T , class Dealloc_T >
RCPNodeArrayRCP_createNewDeallocRCPNodeRawPtr (T *p, Dealloc_T dealloc, bool has_ownership_in)
 
template<class TypeTo , class TypeFrom >
TypeTo as (const TypeFrom &t)
 Convert from one value type to another. More...
 
template<class TypeTo , class TypeFrom >
TypeTo asSafe (const TypeFrom &t)
 Convert from one value type to another, with validity checks if appropriate. More...
 
TEUCHOSCORE_LIB_DLL_EXPORT void dyn_cast_throw_exception (const std::string &T_from, const std::string &T_from_concr, const std::string &T_to)
 
template<class T_To , class T_From >
T_To & dyn_cast (T_From &from)
 Dynamic casting utility function meant to replace dynamic_cast<T&> by throwing a better documented error message. More...
 
template<typename T >
const voidgetBaseObjVoidPtr (T *p)
 Return a const void* pointing to the base of an object. More...
 
template<class T >
const T & getConst (T &t)
 Return a constant reference to an object given a non-const reference. More...
 
template<class Container >
RawPointerConversionTraits< Container >::Ptr_t getRawPtr (const Container &c)
 
template<class Key >
std::string toString (const HashSet< Key > &h)
 
template<class Key >
std::ostream & operator<< (std::ostream &os, const HashSet< Key > &h)
 
template<class Key , class Value >
std::string toString (const Hashtable< Key, Value > &h)
 
template<class Key , class Value >
std::ostream & operator<< (std::ostream &os, const Hashtable< Key, Value > &h)
 
template<class TypeTo , class TypeFrom >
TypeTo implicit_cast (const TypeFrom &t)
 Perform an implicit cast of concrete types with the casted object returned by value. More...
 
template<class TypeTo , class TypeFrom >
TypeTo & implicit_ref_cast (TypeFrom &t)
 Perform an implicit cast of reference types with a reference being returned. More...
 
template<class TypeTo , class TypeFrom >
TypeTo * implicit_ptr_cast (TypeFrom *t)
 Perform an implicit cast of pointer types with a pointer being returned. More...
 
template<class EnumType >
std::istream & enumIstreamExtractor (std::istream &std_is, EnumType &enum_value)
 
template<class T >
RCPNodeRCP_createNewRCPNodeRawPtrNonowned (T *p)
 
template<class T >
RCPNodeRCP_createNewRCPNodeRawPtrNonownedUndefined (T *p)
 
template<class T >
RCPNodeRCP_createNewRCPNodeRawPtr (T *p, bool has_ownership_in)
 
template<class T , class Dealloc_T >
RCPNodeRCP_createNewDeallocRCPNodeRawPtr (T *p, Dealloc_T dealloc, bool has_ownership_in)
 
template<class T , class Dealloc_T >
RCPNodeRCP_createNewDeallocRCPNodeRawPtrUndefined (T *p, Dealloc_T dealloc, bool has_ownership_in)
 
template<class T , class Dealloc_T >
TEUCHOS_DEPRECATED RCP< T > rcp (T *p, Dealloc_T dealloc, bool owns_mem)
 Deprecated. More...
 
template<class ParentT , class T >
RCP< ParentT > getInvertedObjOwnershipParent (const RCP< T > &invertedChild)
 Get the parent back from an inverted ownership RCP. More...
 
void debugAssertStrength (ERCPStrength strength)
 
template<class T >
bool is_null (const std::shared_ptr< T > &p)
 Returns true if p.get()==NULL. More...
 
template<class T >
bool nonnull (const std::shared_ptr< T > &p)
 Returns true if p.get()!=NULL. More...
 
TEUCHOSCORE_LIB_DLL_EXPORT void throwScalarTraitsNanInfError (const std::string &errMsg)
 
template<class Scalar >
bool generic_real_isnaninf (const Scalar &x)
 
bool operator && (const dd_real &a, const dd_real &b)
 
bool operator && (const qd_real &a, const qd_real &b)
 
template<class T >
RCP< SimpleObjectDB< T > > createSimpleObjectDB ()
 Nonmember constructor. More...
 
void store_stacktrace ()
 Stores the current stacktrace into an internal global variable. More...
 
std::string get_stored_stacktrace ()
 Returns the last stored stacktrace as a string. More...
 
std::string get_stacktrace (int impl_stacktrace_depth=0)
 Returns the current stacktrace as a string. More...
 
void show_stacktrace ()
 Prints the current stacktrace to stdout. More...
 
void print_stack_on_segfault ()
 Prints the current stacktrace to stdout on segfault. More...
 
TEUCHOSCORE_LIB_DLL_EXPORT void TestForException_incrThrowNumber ()
 Increment the throw number. More...
 
TEUCHOSCORE_LIB_DLL_EXPORT int TestForException_getThrowNumber ()
 Increment the throw number. More...
 
TEUCHOSCORE_LIB_DLL_EXPORT void TestForException_break (const std::string &msg)
 The only purpose for this function is to set a breakpoint. More...
 
TEUCHOSCORE_LIB_DLL_EXPORT void TestForException_setEnableStacktrace (bool enableStrackTrace)
 Set at runtime if stacktracing functionality is enabled when * exceptions are thrown. More...
 
TEUCHOSCORE_LIB_DLL_EXPORT bool TestForException_getEnableStacktrace ()
 Get at runtime if stacktracing functionality is enabled when exceptions are thrown. More...
 
void updateSuccess (const bool result, bool &success)
 Update the success bool flag. More...
 
const std::string passfail (const bool result)
 Return "passed" or "failed". More...
 
TEUCHOSCORE_LIB_DLL_EXPORT const std::string passfail_with_location (const bool result, const std::string &file, const int lineNumber)
 Helper function for TEUCHOS_PASS_FAIL(...). More...
 
void showTestFailureLocation (bool)
 Set if TEUCHOS_PASS_FAIL(...) should print test failure location. More...
 
bool showTestFailureLocation ()
 Return if TEUCHOS_PASS_FAIL(...) should print test failure location. More...
 
template<class Scalar >
Scalar defaultSmallNumber ()
 
template<class Scalar >
ScalarTraits< Scalar >::magnitudeType relErr (const Scalar &s1, const Scalar &s2)
 Return relative error of two scalars. More...
 
template<class Scalar >
bool testRelErr (const std::string &v1_name, const Scalar &v1, const std::string &v2_name, const Scalar &v2, const std::string &maxRelErr_error_name, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &maxRelErr_error, const std::string &maxRelErr_warning_name, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &maxRelErr_warning, const Ptr< std::ostream > &out)
 Compute, check and optionally print the relative error in two scalars. More...
 
template<class Array1 , class Array2 >
bool compareArrays (const Array1 &a1, const std::string &a1_name, const Array2 &a2, const std::string &a2_name, Teuchos::FancyOStream &out)
 Compare if two array objects are the same or not. More...
 
template<class Array1 , class Array2 , class ScalarMag >
bool compareFloatingArrays (const Array1 &a1, const std::string &a1_name, const Array2 &a2, const std::string &a2_name, const ScalarMag &tol, Teuchos::FancyOStream &out)
 Compare if two array objects are the same or not up to a relative floating point precision. More...
 
template<typename T >
std::string toString (const T &t)
 Utility function for returning a pretty string representation of a object of type T. More...
 
template<class T >
std::istringstream & operator>> (std::istringstream &in, TwoDArray< T > &array)
 
template<class T >
std::ostream & operator<< (std::ostream &os, const TwoDArray< T > &array)
 
template<typename T >
bool operator== (const TwoDArray< T > &a1, const TwoDArray< T > &a2)
 
TEUCHOSCORE_LIB_DLL_EXPORT std::string demangleName (const std::string &mangledName)
 Demangle a C++ name if valid. More...
 
template<typename T >
std::string typeName (const T &t)
 Template function for returning the concrete type name of a passed-in object. More...
 
template<typename T >
std::string concreteTypeName (const T &t)
 Template function for returning the type name of the actual concrete name of a passed-in object. More...
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (bool)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (char)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (signed char)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (unsigned char)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (short int)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (int)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (long int)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (unsigned short int)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (unsigned long int)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (float)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (double)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (__float128)
 
bool operator< (const UnitTestData &a, const UnitTestData &b)
 
std::string getUnitTestName (const std::string groupName, const std::string testName)
 
bool strMatch (const std::string &fullMatchStr, const std::string &str)
 
TEUCHOS_ENUM_INPUT_STREAM_OPERATOR(EVerbosityLevel) TEUCHOSCORE_LIB_DLL_EXPORT std TEUCHOSCORE_LIB_DLL_EXPORT bool includesVerbLevel (const EVerbosityLevel verbLevel, const EVerbosityLevel requestedVerbLevel, const bool isDefaultLevel=false)
 Return a std::string representation of the verbosity level. More...
 
TEUCHOSCORE_LIB_DLL_EXPORT EVerbosityLevel incrVerbLevel (const EVerbosityLevel inputVerbLevel, const int numLevels)
 Return an increased or decreased verbosity level. More...
 
std::string Teuchos_Version ()
 
TEUCHOSCORE_LIB_DLL_EXPORT void set_default_workspace_store (const Teuchos::RCP< WorkspaceStore > &default_workspace_store)
 Set pointer to global workspace object. More...
 
TEUCHOSCORE_LIB_DLL_EXPORT Teuchos::RCP< WorkspaceStoreget_default_workspace_store ()
 Get the global workspace object set by set_default_workspace_store(). More...
 
TEUCHOSCORE_LIB_DLL_EXPORT void print_memory_usage_stats (const WorkspaceStore *workspace_store, std::ostream &out)
 Print statistics on memory usage. More...
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, create)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, DefaultConstruct)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, NonconstConstruct)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, ConstConstruct)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, NonconstInitialize)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, ConstInitialize)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, AssignmentFromRCP)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, uninitialize)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, parens)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, arrow)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, arrowEmpty)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, dereference)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, dereferenceEmpty)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, castToRCP)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, castFromRCP)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, is_null)
 
 TEUCHOS_UNIT_TEST (ConstNonconstObjectContainer, nonnull)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, default_construct)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, construct)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, deref)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, member_access)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, copy_construct_same)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, copy_construct_different)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, assign_same)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, assign_different)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, equality_operators_same)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, equality_operators_different)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, pre_iterate_forward_no_filtering)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, post_iterate_forward_no_filtering)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, pre_iterate_backward_no_filtering)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, post_iterate_backward_no_filtering)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, pre_iterate_forward_filter_even)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, pre_iterate_forward_filter_odd)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, post_iterate_forward_filter_even)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, post_iterate_forward_filter_odd)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, pre_iterate_backward_filter_even)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, pre_iterate_backward_filter_odd)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, post_iterate_backward_filter_even)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, post_iterate_backward_filter_odd)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, iterate_forward_past_end_throw)
 
 TEUCHOS_UNIT_TEST (FilteredIterator, iterate_backward_past_begin_throw)
 
 TEUCHOS_UNIT_TEST (GetBaseObjVoidPtr, polymorphicClasses)
 
 TEUCHOS_UNIT_TEST (GetBaseObjVoidPtr, nonPolymorphicClasses)
 
 TEUCHOS_UNIT_TEST (GetBaseObjVoidPtr, nonPolymorphicBuiltInTypes)
 
 TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION (DummyNS::UndefinedType)
 
template<class T >
RCPNodebasicRCPNodeNoAlloc (T *p, const bool has_ownership)
 
template<class T >
RCPNodebasicRCPNode (const bool has_ownership, T **p_out=0)
 
void deleteRCPNode (RCPNode **node)
 
template<class T >
RCPNodeHandle basicRCPNodeHandle (const bool has_ownership, T **p_out=0)
 
 TEUCHOS_STATIC_SETUP ()
 
 TEUCHOS_UNIT_TEST (RCPNodeHandle, assignSelf)
 
 TEUCHOS_UNIT_TEST (RCPNodeHandle, defaultConstruct)
 
 TEUCHOS_UNIT_TEST (RCPNodeHandle, add_New_RCPNode_basic)
 
 TEUCHOS_UNIT_TEST (RCPNodeHandle, add_New_RCPNode_add_owning_twice_error)
 
 TEUCHOS_UNIT_TEST (RCPNodeHandle, add_New_RCPNode_add_nonowning_twice_okay_1)
 
 TEUCHOS_UNIT_TEST (RCPNodeHandle, add_New_RCPNode_add_nonowning_twice_okay_2)
 
 TEUCHOS_UNIT_TEST (RCPNodeHandle, add_New_RCPNode_add_two_nodes_same_obj)
 
 TEUCHOS_UNIT_TEST (RCPNodeHandle, remove_RCPNode_missing_node)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, basicConstruct_owns_mem, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, basicConstruct_no_owns_mem, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, weakPtr_basic_1, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, weakPtr_basic_2, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, debugWithNodeTracingPrint, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, debugWithoutNodeTracingPrint, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, copyConstruct, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, assignmentOperator, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, extraData_basic, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, extraData_basic_const, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, extraData_failed, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (RCPNodeHandle, extraData_failed_const, T)
 
TwoDArray< intgetSimpleTestTwoDArray ()
 
 TEUCHOS_UNIT_TEST (Teuchos_TwoDArrays, simpleTest)
 
 TEUCHOS_UNIT_TEST (Teuchos_TwoDArrays, stringFunctions)
 
 TEUCHOS_UNIT_TEST (Teuchos_TwoDArrays, emptyTest)
 
 TEUCHOS_UNIT_TEST (Teuchos_TwoDArrays, streamTests)
 
 TEUCHOS_UNIT_TEST (Teuchos_TwoDArray, clearTest)
 
 TEUCHOS_UNIT_TEST (Teuchos_TwoDArray, resizeTest)
 
 TEUCHOS_UNIT_TEST (Teuchos_TwoDArray, symmetryTest)
 
 TEUCHOS_UNIT_TEST (Teuchos_TwoDArray, symmetrySerialization)
 
void globalReduceSuccess (bool &success, FancyOStream &out)
 
 TEUCHOS_UNIT_TEST (GlobalMPISession, basic)
 
 TEUCHOS_UNIT_TEST (GlobalMPISession, barrier)
 
 TEUCHOS_UNIT_TEST (GlobalMPISession, sum)
 
 TEUCHOS_UNIT_TEST (GlobalMPISession, allGather)
 
 TEUCHOS_UNIT_TEST (GlobalMPISession, getArgv)
 
template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view< ViewType >::value)>::type send (const ViewType &sendBuffer, const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
 Variant of send() that takes a tag (and restores the correct order of arguments). More...
 
template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view< ViewType >::value)>::type ssend (const ViewType &sendBuffer, const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
 Variant of ssend() that takes a tag (and restores the correct order of arguments). More...
 
template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view< ViewType >::value)>::type readySend (const ViewType &sendBuffer, const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
 Variant of readySend() that accepts a message tag. More...
 
template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view< ViewType >::value), RCP< CommRequest< Ordinal > > >::type isend (const ViewType &sendBuffer, const int destRank, const int tag, const Comm< Ordinal > &comm)
 Variant of isend() that takes a tag (and restores the correct order of arguments). More...
 
template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view< ViewType >::value), RCP< CommRequest< Ordinal > > >::type ireceive (const ViewType &recvBuffer, const int sourceRank, const int tag, const Comm< Ordinal > &comm)
 Variant of ireceive that takes a tag argument (and restores the correct order of arguments). More...
 
template<typename Ordinal , typename SendViewType , typename RecvViewType >
std::enable_if<(Kokkos::Impl::is_view< SendViewType >::value &&Kokkos::Impl::is_view< RecvViewType >::value)>::type reduceAll (const SendViewType &sendBuf, const RecvViewType &recvBuf, const EReductionType reductionType, const Comm< Ordinal > &comm)
 
template<typename Ordinal , typename Serializer , class SendViewType , class RecvViewType >
std::enable_if<(Kokkos::Impl::is_view< SendViewType >::value &&Kokkos::Impl::is_view< RecvViewType >::value)>::type reduceAll (const Comm< Ordinal > &comm, const Serializer &serializer, const EReductionType reductType, const Ordinal count, const SendViewType &sendBuffer, const RecvViewType &recvBuffer)
 
template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view< ViewType >::value)>::type broadcast (const Comm< Ordinal > &comm, const int rootRank, const Ordinal count, const ViewType &buffer)
 
template<typename Ordinal , class ViewType , typename Serializer >
std::enable_if<(Kokkos::Impl::is_view< ViewType >::value)>::type broadcast (const Comm< Ordinal > &comm, const Serializer &serializer, const int rootRank, const Ordinal count, const ViewType &buffer)
 
std::ostream & operator<< (std::ostream &os, const Teuchos::Object &obj)
 
 PT_SPEC (double, std::complex< float >, std::complex< double >) PT_SPEC(float
 
std::complex< doublePT_SPEC (float, std::complex< float >, std::complex< float >) PT_SPEC(double
 
std::complex< double > std::complex< doublePT_SPEC (double, float, double) PT_SPEC(double
 
std::complex< double > std::complex< double > double PT_SPEC (double, int, double) PT_SPEC(float
 
template<class ObjectType >
RCP< ObjectBuilder< ObjectType > > objectBuilder ()
 
template<class ObjectType >
RCP< ObjectBuilder< ObjectType > > objectBuilder (const std::string &objectName, const std::string &objectTypeName)
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void printValidParameters (const ParameterListAcceptor &paramListAccpetor, std::ostream &out, const bool showDoc=true)
 Pretty print the valid parameters from a ParameterListAccpetor object. More...
 
template<class IntegralType >
RCP< const StringToIntegralParameterEntryValidator< IntegralType > > getStringToIntegralParameterEntryValidator (ParameterEntry const &entry, ParameterList const &paramList, std::string const &paramName)
 Get a StringToIntegralParameterEntryValidator<IntegralType> object out of a ParameterEntry object. More...
 
template<>
std::string XMLObject::getRequired< std::string > (const std::string &name) const
 
template<>
void XMLObject::addAttribute< const std::string & > (const std::string &name, const std::string &value)
 
template<>
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT std::string XMLObject::getRequired< std::string > (const std::string &name) const
 
template<>
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void XMLObject::addAttribute< const std::string & > (const std::string &name, const std::string &value)
 
XMLTestNode PerfTest_MachineConfig ()
 PerfTest_MachineConfig generates a basic machine configuration XMLTestNode. More...
 
PerfTestResult PerfTest_CheckOrAdd_Test (XMLTestNode machine_config, XMLTestNode new_test, const std::string filename, const std::string ext_hostname=std::string())
 Check whether a test is present and match an existing test in an archive. More...
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromYamlCString (const char *const data, const Teuchos::Ptr< Teuchos::ParameterList > &paramList, bool overwrite)
 
template<typename T >
Teuchos::Array< T > getYamlArray (const YAML::Node &node)
 
void updateParametersFromYamlFile (const std::string &yamlFileName, const Teuchos::Ptr< Teuchos::ParameterList > &paramList)
 
void updateParametersFromYamlString (const std::string &yamlData, const Teuchos::Ptr< Teuchos::ParameterList > &paramList, bool overwrite)
 
Teuchos::RCP< Teuchos::ParameterListgetParametersFromYamlFile (const std::string &yamlFileName)
 
std::string convertXmlToYaml (const std::string &xmlFileName)
 
void convertXmlToYaml (const std::string &xmlFileName, const std::string &yamlFileName)
 
bool haveSameValuesUnordered (const Teuchos::ParameterList &lhs, const Teuchos::ParameterList &rhs, bool verbose)
 
 TEUCHOS_UNIT_TEST (Teuchos_Conditions, StringConditionSerialization)
 
 TEUCHOS_UNIT_TEST (Teuchos_Conditions, BoolConditionSerialization)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Teuchos_Conditions, NumberConditionSerialization, T)
 
 NUMBER_PARAM_TYPE_TEST (int) NUMBER_PARAM_TYPE_TEST(uint) NUMBER_PARAM_TYPE_TEST(short) NUMBER_PARAM_TYPE_TEST(ushort) NUMBER_PARAM_TYPE_TEST(long) NUMBER_PARAM_TYPE_TEST(ulong) NUMBER_PARAM_TYPE_TEST(float) NUMBER_PARAM_TYPE_TEST(double) typedef long long int llint
 
 NUMBER_PARAM_TYPE_TEST (llint) NUMBER_PARAM_TYPE_TEST(ullint) TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL(Teuchos_Conditions
 
testList set (paramName1, paramValue1)
 
testList set (paramName2, paramValue2)
 
testList set (dependent1Name, dependentValue)
 
depSheet1 addDependency (binConDep)
 
 TEST_EQUALITY (readInDep1.get(), readInDep1.get())
 
 TEST_EQUALITY (readInDep1->getCondition() ->getTypeAttributeValue(), DummyObjectGetter< BinCondition >::getDummyObject() ->getTypeAttributeValue())
 
 TEST_ASSERT (nonnull(readInCon))
 
 TEST_ASSERT (readInConList.size()==2)
 
 BIN_CON_TEST (AndCondition) BIN_CON_TEST(OrCondition) BIN_CON_TEST(EqualsCondition) TEUCHOS_UNIT_TEST(Teuchos_Conditions
 
ParameterList testList ("Condition Test List")
 
depSheet1 addDependency (notConDep)
 
 TEST_EQUALITY (readInDep1->getCondition() ->getTypeAttributeValue(), DummyObjectGetter< NotCondition >::getDummyObject() ->getTypeAttributeValue())
 
 TEUCHOS_UNIT_TEST (Teuchos_Conditions, ConditionSerializationExceptions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Conditions, testConditions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Conditions, testConditionGetterAndSetters)
 
 TEUCHOS_UNIT_TEST (Teuchos_Conditions, testConditionException)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, SerializationTestMacros)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, StringVisualDepSerialization)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, BoolVisualDepSerialization)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Teuchos_Dependencies, NumberVisualDepSerialization, T)
 
 NUMBER_VIS_TEST (int) NUMBER_VIS_TEST(double) NUMBER_VIS_TEST(float) NUMBER_VIS_TEST(llint) TEUCHOS_UNIT_TEST(Teuchos_Dependencies
 
myDepList set (dependee1, "val1")
 
myDepList set (dependee2, true)
 
myDepList set (dependee3, 1)
 
myDepList set (dependent1, 1.0)
 
myDepList set (dependent2, 1.0)
 
myDepList set (dependent3,(float) 1.0)
 
dependentList insert (myDepList.getEntryRCP(dependent2))
 
dependentList insert (myDepList.getEntryRCP(dependent3))
 
myDepSheet addDependency (simpleConVisDep)
 
myDepSheet addDependency (complexConVisDep)
 
 BASIC_DEPENDENCY_TEST (readinDep1, ConditionVisualDependency, 1, 1)
 
 VERIFY_DEPENDEE (readinDep1, readinDependee1)
 
 VERIFY_DEPENDENT (readinDep1, readinDependent1)
 
 TEST_ASSERT (readinDep2.get()==readinDep3.get())
 
 BASIC_DEPENDENCY_TEST (readinDep2, ConditionVisualDependency, 2, 2)
 
 VERIFY_DEPENDEE (readinDep2, readinDependee2)
 
 VERIFY_DEPENDEE (readinDep2, readinDependee3)
 
 VERIFY_DEPENDENT (readinDep2, readinDependent2)
 
 VERIFY_DEPENDENT (readinDep2, readinDependent3)
 
 TEST_EQUALITY (castedDep1->getShowIf(), simpleConVisDep->getShowIf())
 
 TEST_EQUALITY (castedDep2->getShowIf(), complexConVisDep->getShowIf())
 
 TEST_EQUALITY (castedDep1->getCondition() ->getTypeAttributeValue(), simpleConVisDep->getCondition() ->getTypeAttributeValue())
 
 TEST_EQUALITY (castedDep2->getCondition() ->getTypeAttributeValue(), complexConVisDep->getCondition() ->getTypeAttributeValue())
 
 ArrayModifierTest (NumberArrayLengthDependency, Array) NUM_ARRAY_LENGTH_TEST_GROUP(int) NUM_ARRAY_LENGTH_TEST_GROUP(llint) ArrayModifierTest(TwoDRowDependency
 
 TWODROW_TEST_GROUP (int) TWODROW_TEST_GROUP(llint) ArrayModifierTest(TwoDColDependency
 
 TWODCOL_TEST_GROUP (int) TWODCOL_TEST_GROUP(llint) TEUCHOS_UNIT_TEST(Teuchos_Dependencies
 
ParameterList myDepList ("String Vali Dep List")
 
myDepList set (dependee2, "val2")
 
myDepList set (dependent1, 2.0)
 
myDepList set (dependent2, 3.0)
 
dependentList insert (myDepList.getEntryRCP(dependent1))
 
myDepSheet addDependency (basicStringValiDep)
 
myDepSheet addDependency (complexStringValiDep)
 
 BASIC_DEPENDENCY_TEST (readinDep1, StringValidatorDependency, 1, 1)
 
 BASIC_DEPENDENCY_TEST (readinDep2, StringValidatorDependency, 1, 2)
 
 VERIFY_DEPENDENT (readinDep2, readinDependent1)
 
 TEST_ASSERT (castedDep1->getValuesAndValidators().size()==2)
 
 TEST_ASSERT (castedDep2->getValuesAndValidators().size()==2)
 
 TEST_ASSERT (castedDep1->getDefaultValidator().is_null())
 
 TEST_ASSERT (nonnull(castedDep2->getDefaultValidator()))
 
 TEST_EQUALITY (rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep1->getValuesAndValidators().find("val1") ->second, true) ->getMax(), double1Vali->getMax())
 
 TEST_EQUALITY (rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep2->getValuesAndValidators().find("val1") ->second, true) ->getMax(), double1Vali->getMax())
 
 TEST_EQUALITY (rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep1->getValuesAndValidators().find("val2") ->second, true) ->getMax(), double2Vali->getMax())
 
 TEST_EQUALITY (rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep2->getValuesAndValidators().find("val2") ->second, true) ->getMax(), double2Vali->getMax())
 
 TEST_EQUALITY (rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep2->getDefaultValidator(), true) ->getMax(), defaultVali->getMax())
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, BoolValidatorDepSerialization)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Teuchos_Dependencies, RangeValidatorDepSerialization, T)
 
 RANGE_VALIDATOR_TEST (int) RANGE_VALIDATOR_TEST(double) RANGE_VALIDATOR_TEST(float) RANGE_VALIDATOR_TEST(llint) TEUCHOS_UNIT_TEST(Teuchos_Dependencies
 
 TEST_THROW (RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
 
 TEST_THROW (RCP< ParameterList > missingDependentsList=getParametersFromXmlFile("MissingDependentTag.xml", depSheet), MissingDependentsException)
 
 TEST_THROW (RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependee.xml", depSheet), MissingDependeeException)
 
 TEST_THROW (RCP< ParameterList > missingDependentList=getParametersFromXmlFile("MissingDependent.xml", depSheet), MissingDependentException)
 
 TEST_THROW (boolVisConverter.fromDependencytoXML(boolVisDep, entryIDsMap, validatorIDsMap), MissingDependeeException)
 
entryIDsMap erase (dependentParam)
 
 TEST_THROW (boolVisConverter.fromDependencytoXML(boolVisDep, entryIDsMap, validatorIDsMap), MissingDependentException)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, NumberVisualDepSerializationExceptions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, BoolVisualDepSerializationExceptions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, StringVisualDepSerializationExceptions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, ConditionVisualDepSerializationExceptions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, BoolValidatorDepSerializationExceptions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, StringValidatorDepSerializationExceptions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, RangeValidatorDepSerializationExceptions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, NumArrayLengthDepSerializationExceptions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, DepSheetTests)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, testValiDeps)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, testVisualDeps)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, testTwoDRowDependency)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, testTwoDColDependency)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, testArrayLengthDep)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, testDepExceptions)
 
 TEUCHOS_UNIT_TEST (Teuchos_Dependencies, DepSheetTest)
 
 TEUCHOS_UNIT_TEST (Teuchos_Functions, SubtractionTests)
 
 TEUCHOS_UNIT_TEST (Teuchos_Functions, AdditionTests)
 
 TEUCHOS_UNIT_TEST (Teuchos_Functions, MultiplicationTests)
 
 TEUCHOS_UNIT_TEST (Teuchos_Functions, DivisionTests)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, constructor)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, setNames)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, setObjectFactory)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, setObjectFactory_bad)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, getObjectName)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, create)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, setParameterList)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, getParameterList)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, getNonconstParameterList)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, unsetParameterList)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, getValidParameters)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, usedParameters)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, setDefaultObject_withOneUsePL)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, setDefaultObject_withMultipleUsePL)
 
 TEUCHOS_UNIT_TEST (Teuchos_ObjectBuilder, setDefaultObject_withoutPL)
 
 TEUCHOS_UNIT_TEST (Teuchos_ParameterEntry, testTypeFunctions)
 
 TEUCHOS_UNIT_TEST (Teuchos_ParameterList, ADD_TYPE_AND_ARRAY_TYPE_PARAMETER)
 
 TEUCHOS_UNIT_TEST (Teuchos_ParameterList, parameterEntryXMLConverters)
 
 TEUCHOS_UNIT_TEST (Teuchos_ParameterList, parameterEntryConverterExceptions)
 
ParameterList createMainPL ()
 
ParameterList createValidMainPL ()
 
 TEUCHOS_UNIT_TEST (ParameterList, construct_default)
 
 TEUCHOS_UNIT_TEST (ParameterList, construct_withName)
 
 TEUCHOS_UNIT_TEST (ParameterList, createParameterList_empty)
 
 TEUCHOS_UNIT_TEST (ParameterList, createParameterList_withName)
 
 TEUCHOS_UNIT_TEST (ParameterList, set_get_int)
 
 TEUCHOS_UNIT_TEST (ParameterList, param_isParameter_isSublist_isType)
 
 TEUCHOS_UNIT_TEST (ParameterList, sublist_isParameter_isSublist_isType)
 
 TEUCHOS_UNIT_TEST (ParameterList, set_doc)
 
 TEUCHOS_UNIT_TEST (ParameterList, set_doc_validator)
 
 TEUCHOS_UNIT_TEST (ParameterList, set_invalid_int_first)
 
 TEUCHOS_UNIT_TEST (ParameterList, set_invalid_int_second)
 
 TEUCHOS_UNIT_TEST (ParameterList, set_get_entry)
 
 TEUCHOS_UNIT_TEST (ParameterList, set_int_twice_keep_validator)
 
 TEUCHOS_UNIT_TEST (ParameterList, set_get_char_str)
 
 TEUCHOS_UNIT_TEST (ParameterList, set_get_string)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_nonexisting_param)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_existing_incorrect_type)
 
 TEUCHOS_UNIT_TEST (ParameterList, getPtr)
 
 TEUCHOS_UNIT_TEST (ParameterList, getEntryRCP)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_default_then_change)
 
 TEUCHOS_UNIT_TEST (ParameterList, remove_1)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_nonexisting_sublist_default)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_nonexisting_sublist_docString)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_nonexisting_sublist_mustAlreadyExist)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_existing_sublist_nonsublist)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_existing_sublist_nonconst)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_existing_sublist_const)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_nonexisting_sublist_const)
 
 TEUCHOS_UNIT_TEST (ParameterList, get_existing_sublist_const_nonsublist)
 
 TEUCHOS_UNIT_TEST (ParameterList, sublist_add_2)
 
 TEUCHOS_UNIT_TEST (ParameterList, sublist_scenario_1)
 
 TEUCHOS_UNIT_TEST (ParameterList, copy_constructor)
 
 TEUCHOS_UNIT_TEST (ParameterList, assignment_operator)
 
 TEUCHOS_UNIT_TEST (ParameterList, iterator_params)
 
 TEUCHOS_UNIT_TEST (ParameterList, iterator_params_sublists)
 
 TEUCHOS_UNIT_TEST (ParameterList, operatorEqualityWithEmpty)
 
 TEUCHOS_UNIT_TEST (ParameterList, operatorEqualityDifferentSublistNames)
 
 TEUCHOS_UNIT_TEST (ParameterList, operatorEqualityDifferentLengths)
 
 TEUCHOS_UNIT_TEST (ParameterList, haveSameValuesWithEmpty)
 
 TEUCHOS_UNIT_TEST (ParameterList, haveSameValuesDifferentSublistNames)
 
 TEUCHOS_UNIT_TEST (ParameterList, validateAgainstSelf)
 
 TEUCHOS_UNIT_TEST (ParameterList, validateParametersAndSetDefaults)
 
 TEUCHOS_UNIT_TEST (ParameterList, getIntegralValue_int)
 
 TEUCHOS_UNIT_TEST (ParameterList, ExistingSublistIsOkay)
 
 TEUCHOS_UNIT_TEST (ParameterList, XMLDuplicatedSublists)
 
 TEUCHOS_UNIT_TEST (XMLParameterListReader, XMLDuplicatedSublistsThrowsError)
 
 TEUCHOS_UNIT_TEST (XMLParameterListReader, XMLDuplicatedSublistsBackwardsCompatible)
 
 TEUCHOS_UNIT_TEST (OrdinalIndex, defaultConstruct)
 
 TEUCHOS_UNIT_TEST (OrdinalIndex, construct)
 
 TEUCHOS_UNIT_TEST (KeyObjectPair, defaultConstruct)
 
 TEUCHOS_UNIT_TEST (KeyObjectPair, construct_default_isActive)
 
 TEUCHOS_UNIT_TEST (KeyObjectPair, makeInvalid)
 
 TEUCHOS_UNIT_TEST (KeyObjectPair, construct_set_isActive)
 
 TEUCHOS_UNIT_TEST (KeyObjectPair, copyConstruct)
 
 TEUCHOS_UNIT_TEST (KeyObjectPair, assign)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, defaultConstruct)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, basic_set_get)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, set_two_keep_ref)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, getObjOrdinalIndex)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, set_and_set_again)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, basicNonconstIterators)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, basicConstIterators)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, removeObj_idx_first)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, removeObj_key_first)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, removeObj_idx_middle)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, removeObj_key_middle)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, removeObj_idx_last)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, removeObj_key_last)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, getNonconstObjPtr_idx_invalid)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, getObjPtr_idx_invalid)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, removeObj_idx_invalid)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, getNonconstObjPtr_key_invalid)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, getObjPtr_key_invalid)
 
 TEUCHOS_UNIT_TEST (StringIndexedOrderedValueObjectContainer, removeObj_key_invalid)
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterListwriteThenReadPL (ParameterList &myList)
 Write a parameter list to xml and then read that xml back in via a string. The intent of this function is to be used for testing purposes. More...
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterListwriteThenReadPL (ParameterList &myList, RCP< DependencySheet > depSheetIn, RCP< DependencySheet > depSheetOut)
 Write a parameter list to xml and then read that xml back in via a string. The intent of this function is to be used for testing purposes. More...
 
 TEUCHOS_UNIT_TEST (Teuchos_Validator, exceptionTests)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validator, fileNameValidatorConverter)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validator, stringValidatorConverter)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validator, boolValidatorConverter)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validator, anynumberValidatorConverter)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Teuchos_Validator, EnhancedNumberValidatorConverter, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Teuchos_Validator, NumberArrayValidatorConverterTest, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Teuchos_Validator, TwoDArrayNumberValidatorConverterTest, T)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Teuchos_Validator, StringToIntegralConverterTest, T)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validator, existingPrototypeTest)
 
 FULL_NUMBER_TYPE_TEST (int) NONINTEGRAL_NUMBER_TYPE_TEST(double) NONINTEGRAL_NUMBER_TYPE_TEST(float) typedef long long int llint
 
 TEUCHOS_UNIT_TEST (Teuchos_Validators, numberValidators)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validators, anyNumberValidator)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validators, boolValidator)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validators, stringValidator)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validators, fileNameValidator)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validators, arrayValidators)
 
 TEUCHOS_UNIT_TEST (Teuchos_Validators, twoDArrayValidators)
 
 TEUCHOS_UNIT_TEST (XMLParameterListHelpers, anonymousSublists)
 
 TEUCHOS_UNIT_TEST (XMLParameterListHelpers, anonymousParam)
 
 TEUCHOS_UNIT_TEST (XMLParameterListHelpers, toFromFile)
 
 TEUCHOS_UNIT_TEST (XMLParameterListHelpers, OverwriteTest)
 
 TEUCHOS_UNIT_TEST (XMLParser, orderedWriteRead)
 
 TEUCHOS_UNIT_TEST (XMLParser, simpleOrderedRead)
 
 TEUCHOS_UNIT_TEST (XMLParser, ParseFile)
 
 TEUCHOS_UNIT_TEST (XMLParser, IgnoreDeclarations)
 
 TEUCHOS_UNIT_TEST (XMLParser, simpletest)
 
template<class T >
TEUCHOS_DEPRECATED ArrayArg< 1, T > arrayArg (T t1)
 Return an array with 1 member. More...
 
template<class T >
TEUCHOS_DEPRECATED ArrayArg< 2, T > arrayArg (T t1, T t2)
 Return an array with 2 members. More...
 
template<class T >
TEUCHOS_DEPRECATED ArrayArg< 3, T > arrayArg (T t1, T t2, T t3)
 Return an array with 3 members. More...
 
template<class T >
TEUCHOS_DEPRECATED ArrayArg< 4, T > arrayArg (T t1, T t2, T t3, T t4)
 Return an array with 4 members. More...
 
template<class T >
TEUCHOS_DEPRECATED ArrayArg< 5, T > arrayArg (T t1, T t2, T t3, T t4, T t5)
 Return an array with 5 members. More...
 
template<class T >
TEUCHOS_DEPRECATED ArrayArg< 6, T > arrayArg (T t1, T t2, T t3, T t4, T t5, T t6)
 Return an array with 6 members. More...
 
void doFloatingPointTrap (bool enableTrap)
 Turn on or off a floating point trap. More...
 

Variables

const float flt_nan = +returnFloatZero()/returnFloatZero()
 
const double dbl_nan = +returnDoubleZero()/returnDoubleZero()
 
gmp_randclass gmp_rng
 
TEUCHOSNUMERICS_LIB_DLL_EXPORT const char ESideChar [] = {'L' , 'R' }
 
TEUCHOSNUMERICS_LIB_DLL_EXPORT const char ETranspChar [] = {'N' , 'T' , 'C' }
 
TEUCHOSNUMERICS_LIB_DLL_EXPORT const char EUploChar [] = {'U' , 'L' }
 
TEUCHOSNUMERICS_LIB_DLL_EXPORT const char EDiagChar [] = {'U' , 'N' }
 
TEUCHOSNUMERICS_LIB_DLL_EXPORT const char ETypeChar [] = {'G' , 'L', 'U', 'H', 'B', 'Q', 'Z' }
 
std::complex< double > std::complex< doublelong
 
 BoolLogicConditionSerialization
 
 BinCondition
 
std::string paramName1 = "bool param1"
 
std::string paramName2 = "bool param2"
 
std::string dependent1Name = "dependent1"
 
bool paramValue1 = true
 
bool paramValue2 = false
 
std::string dependentValue = "hi there!"
 
ParameterList testList ("Condition Test List")
 
RCP< BoolConditionboolCon1
 
RCP< BoolConditionboolCon2
 
Condition::ConstConditionList conList
 
RCP< BinConditionbinCon = rcp(new BinCondition (conList))
 
RCP< ConditionVisualDependencybinConDep
 
RCP< DependencySheetdepSheet1 = rcp(new DependencySheet)
 
RCP< DependencySheetdepSheetIn = rcp(new DependencySheet)
 
RCP< ParameterListreadinList
 
RCP< ParameterEntryreadInDependee1 = readinList->getEntryRCP(paramName1)
 
RCP< ParameterEntryreadInDependee2 = readinList->getEntryRCP(paramName2)
 
RCP< ConditionVisualDependencyreadInDep1
 
RCP< ConditionVisualDependencyreadInDep2
 
RCP< const BinConditionreadInCon
 
Condition::ConstConditionList readInConList = readInCon->getConditions()
 
 NotConditionSerialization
 
RCP< NotConditionnotCon = rcp(new NotCondition(boolCon1))
 
RCP< ConditionVisualDependencynotConDep
 
 ConditionVisualDepSerialization
 
std::string dependee2 = "bool param"
 
std::string dependee3 = "int param"
 
std::string dependent1 = "dependent param1"
 
std::string dependent2 = "dependent param2"
 
std::string dependent3 = "dependent param3"
 
ParameterList myDepList ("Condition Visual Dep List")
 
RCP< DependencySheetmyDepSheet = rcp(new DependencySheet)
 
StringCondition::ValueList conditionVal1
 
RCP< StringConditionstringCon
 
RCP< BoolConditionboolCon
 
RCP< NumberCondition< int > > numberCon
 
RCP< AndConditionandCon = rcp(new AndCondition(conList))
 
RCP< ConditionVisualDependencysimpleConVisDep
 
Dependency::ParameterEntryList dependentList
 
RCP< ConditionVisualDependencycomplexConVisDep
 
RCP< DependencySheetreadInDepSheet = rcp(new DependencySheet)
 
XMLParameterListWriter plWriter
 
XMLObject xmlOut = plWriter.toXML(myDepList, myDepSheet)
 
out<< xmlOut.toString();RCP< ParameterListreadInList
 
RCP< ParameterEntryreadinDependee1 = readInList->getEntryRCP(dependee1)
 
RCP< ParameterEntryreadinDependent1 = readInList->getEntryRCP(dependent1)
 
RCP< ParameterEntryreadinDependee2 = readInList->getEntryRCP(dependee2)
 
RCP< ParameterEntryreadinDependent2 = readInList->getEntryRCP(dependent2)
 
RCP< ParameterEntryreadinDependee3 = readInList->getEntryRCP(dependee3)
 
RCP< ParameterEntryreadinDependent3 = readInList->getEntryRCP(dependent3)
 
RCP< DependencyreadinDep1
 
RCP< DependencyreadinDep2
 
RCP< DependencyreadinDep3
 
RCP< ConditionVisualDependencycastedDep1
 
RCP< ConditionVisualDependencycastedDep2
 
 StringValidatorDepSerialization
 
RCP< EnhancedNumberValidator< double > > double1Vali
 
RCP< EnhancedNumberValidator< double > > double2Vali
 
RCP< EnhancedNumberValidator< double > > defaultVali
 
StringValidatorDependency::ValueToValidatorMap valuesAndValidators = double1Vali
 
RCP< StringValidatorDependencybasicStringValiDep
 
RCP< StringValidatorDependencycomplexStringValiDep
 
 DependencySerializationExceptions
 
RCP< ParameterEntrydependeeParam = rcp(new ParameterEntry(true))
 
RCP< ParameterEntrydependentParam = rcp(new ParameterEntry("blah"))
 
RCP< BoolVisualDependencyboolVisDep
 
XMLParameterListWriter::EntryIDsMap entryIDsMap = 1
 
ValidatortoIDMap validatorIDsMap
 
BoolVisualDependencyXMLConverter boolVisConverter
 
const std::string ObjectType_name = "Foo Type"
 
const int g_arraySize = 5
 

Typedef Documentation

◆ FancyOStream

Definition at line 835 of file Teuchos_FancyOStream.hpp.

◆ llint

Definition at line 64 of file Dependencies_SerializationTests.cpp.

◆ myString_t

typedef std::string Teuchos::myString_t

Definition at line 62 of file Dependencies_SerializationTests.cpp.

◆ oblackholestream

Definition at line 51 of file Teuchos_oblackholestream.hpp.

◆ Ordinal

Definition at line 154 of file Teuchos_ConfigDefs.hpp.

◆ OSTab

Definition at line 841 of file Teuchos_FancyOStream.hpp.

◆ stat_map_type

Global statistics collected from timer data.

Key: name of the timer.

Value: each entry in the vector is a timing and call count for that timer, corresponding to a particular statistic (e.g., minimum, arithmetic mean, or maximum). What statistic that is depends on an auxillary array "statNames" which has the same ordering as the entries in this vector. See the documentation of TimeMonitor::computeGlobalTimerStatistics().

Definition at line 141 of file Teuchos_TimeMonitor.hpp.

◆ timer_map_t

typedef std::map<std::string, std::pair<double, int> > Teuchos::timer_map_t

Definition at line 246 of file Teuchos_TimeMonitor.cpp.

◆ uint

typedef unsigned int Teuchos::uint

Definition at line 256 of file Condition_Serialization_UnitTests.cpp.

◆ ullint

typedef unsigned long long int Teuchos::ullint

Definition at line 270 of file Condition_Serialization_UnitTests.cpp.

◆ ulong

typedef unsigned long Teuchos::ulong

Definition at line 258 of file Condition_Serialization_UnitTests.cpp.

◆ ushort

typedef unsigned short Teuchos::ushort

Definition at line 257 of file Condition_Serialization_UnitTests.cpp.

Enumeration Type Documentation

◆ DataAccess

If set to Copy, user data will be copied at construction. If set to View, user data will be encapsulated and used throughout the life of the object.

Enumerator
Copy 

User data will be copied at construction.

View 

User data will be encapsulated and used throughout the life of the object.

Definition at line 60 of file Teuchos_DataAccess.hpp.

◆ ECounterSetOp

Set operation type for mergeCounterNames() to perform.

The mergeCounterNames() function merges sets of counter names over all MPI processes in a communicator. Different MPI processes may have created different sets of counters. This enum allows the caller to specify how mergeCounterNames() picks the global set of timers.

Enumerator
Intersection 
Union 

Definition at line 66 of file Teuchos_PerformanceMonitorBase.hpp.

◆ EDiag

Enumerator
UNIT_DIAG 

Unit diagaonal

NON_UNIT_DIAG 

Not unit diagonal

Definition at line 105 of file Teuchos_BLAS_types.hpp.

◆ ENull

template<class T>
enum ENull
related

Used to initialize a RCP object to NULL using an implicit conversion!

Definition at line 54 of file Teuchos_ENull.hpp.

◆ EPrePostDestruction

Used to specify a pre or post destruction of extra data.

Enumerator
PRE_DESTROY 
POST_DESTROY 

Definition at line 70 of file Teuchos_RCPNode.hpp.

◆ ERCPNodeLookup

Used to determine if RCPNode lookup is performed or not.

Enumerator
RCP_ENABLE_NODE_LOOKUP 
RCP_DISABLE_NODE_LOOKUP 

Definition at line 82 of file Teuchos_RCPNode.hpp.

◆ ERCPStrength

Used to specify if the pointer is weak or strong.

Enumerator
RCP_STRONG 
RCP_WEAK 

Definition at line 76 of file Teuchos_RCPNode.hpp.

◆ ERCPUndefinedWeakNoDealloc

Enumerator
RCP_UNDEFINED_WEAK_NO_DEALLOC 

Definition at line 76 of file Teuchos_RCPDecl.hpp.

◆ ERCPUndefinedWithDealloc

Enumerator
RCP_UNDEFINED_WITH_DEALLOC 

Definition at line 77 of file Teuchos_RCPDecl.hpp.

◆ ERCPWeakNoDealloc

Enumerator
RCP_WEAK_NO_DEALLOC 

Definition at line 75 of file Teuchos_RCPDecl.hpp.

◆ EReductionType

template<typename Ordinal>
enum EReductionType
related

Predefined reduction operations that Teuchos::Comm understands.

Teuchos' Comm class wraps MPI (the Message Passing Interface for distributed-memory parallel programming). If you do not have MPI, it imitates MPI's functionality, as if you were running with a single "parallel" process. This means that Teuchos must wrap a subset of MPI's functionality, so that it can build without MPI.

Comm provides wrappers for MPI_Reduce, MPI_Allreduce, and other collectives that take a reduction operator MPI_Op. Teuchos wraps MPI_Op in two different ways. The first way is this enum, which lets users pick from a set of common predefined MPI_Op. The second way is through Teuchos' wrappers for custom MPI_Op, namely ValueTypeReductionOp and ValueTypeReductionOp. Most users should find the reduction operators below sufficient.

Definition at line 71 of file Teuchos_EReductionType.hpp.

◆ EShowTestDetails

◆ ESide

Enumerator
LEFT_SIDE 

Left side

RIGHT_SIDE 

Right side

Definition at line 88 of file Teuchos_BLAS_types.hpp.

◆ ETransp

Enumerator
NO_TRANS 

Not transposed

TRANS 

Transposed

CONJ_TRANS 

Conjugate transposed

Definition at line 93 of file Teuchos_BLAS_types.hpp.

◆ EType

Enumerator
FULL 

Full matrix

LOWER 

Lower triangular

UPPER 

Upper triangular

HESSENBERG 

Upper Hessenberg

SYM_BAND_L 

Symmetric band, lower half stored

SYM_BAND_U 

Symmetric band, upper half stored

BAND 

General band

Definition at line 110 of file Teuchos_BLAS_types.hpp.

◆ EUplo

Enumerator
UPPER_TRI 

Upper triangular

LOWER_TRI 

Lower triangular

UNDEF_TRI 

Unspeficied/undefined triangular structure

Definition at line 99 of file Teuchos_BLAS_types.hpp.

◆ EValidateDefaults

enum EValidateDefaults
related

◆ EValidateUsed

enum EValidateUsed
related

◆ EVerbosityLevel

Verbosity level.

Enumerator
VERB_DEFAULT 

Generate output as defined by the object.

VERB_NONE 

Generate no output.

VERB_LOW 

Generate only a minimal amount of output.

VERB_MEDIUM 

Generate more output.

VERB_HIGH 

Generate a high level of output.

VERB_EXTREME 

Generate the most output possible.

Definition at line 62 of file Teuchos_VerbosityLevel.hpp.

62  {
63  VERB_DEFAULT=-1,
64  VERB_NONE=0,
65  VERB_LOW=1,
66  VERB_MEDIUM=2,
67  VERB_HIGH=3,
68  VERB_EXTREME=4
69 };
Generate the most output possible.
Generate only a minimal amount of output.
Generate no output.
Generate more output.
Generate output as defined by the object.
Generate a high level of output.

◆ PerfTestResult

Function Documentation

◆ addDependency() [1/6]

depSheet1 Teuchos::addDependency ( binConDep  )

◆ addDependency() [2/6]

depSheet1 Teuchos::addDependency ( notConDep  )

◆ addDependency() [3/6]

myDepSheet Teuchos::addDependency ( simpleConVisDep  )

◆ addDependency() [4/6]

myDepSheet Teuchos::addDependency ( complexConVisDep  )

◆ addDependency() [5/6]

myDepSheet Teuchos::addDependency ( basicStringValiDep  )

◆ addDependency() [6/6]

myDepSheet Teuchos::addDependency ( complexStringValiDep  )

◆ arrayConstPtrConstCast()

template<class T >
ArrayView<const Ptr<const T> > Teuchos::arrayConstPtrConstCast ( const ArrayView< const Ptr< T > > &  a_in)

Utility function that does a reinterpret case to convert an ArrayView<const Ptr<T> > object to an ArrayView<const Ptr<const T> > object.

Making this conversion requires an reinterpret case since Ptr<T> is not exactly the same thing as a raw pointer but this conversion should be 100 percent portable and safe.

Definition at line 153 of file Teuchos_ArrayConversions.hpp.

154 {
155  return av_reinterpret_cast<const Ptr<const T> >(a_in);
156 }
ArrayView< T2 > av_reinterpret_cast(const ArrayView< T1 > &p1)
Reinterpret cast of underlying ArrayView type from T1* to T2*.

◆ arrayConstRcpConstCast()

template<class T >
ArrayView<const RCP<const T> > Teuchos::arrayConstRcpConstCast ( const ArrayView< const RCP< T > > &  a_in)

Utility function that does a reinterpret case to convert an ArrayView<const RCP<T> > object to an ArrayView<const RCP<const T> > object.

Making this conversion requires an reinterpret case since RCP<T> is not exactly the same thing as a raw pointer but this conversion should be 100 percent portable and safe.

Definition at line 171 of file Teuchos_ArrayConversions.hpp.

172 {
173  return av_reinterpret_cast<const RCP<const T> >(a_in);
174 }
ArrayView< T2 > av_reinterpret_cast(const ArrayView< T1 > &p1)
Reinterpret cast of underlying ArrayView type from T1* to T2*.

◆ ArrayModifierTest()

Teuchos::ArrayModifierTest ( NumberArrayLengthDependency  ,
Array   
)

◆ arrayPtrConv()

template<class T_out , class ArrayPtrT_in >
Array<Ptr<T_out> > Teuchos::arrayPtrConv ( const ArrayPtrT_in &  a_in)

Utility function to convert an Array[View,RCP]<[const] PTR<T_in> > object to an Array<Ptr<T_out> > object.

The input array type can be Array, ArrayView, ArrayRCP, or any other array object that supports size() and operator[](const int).

The reason that the while array input type is a template argument instead of just passing in ArrayView templated on the pointer type is that implicit conversions of the array input type will not take place unless you specify the type of the input. That is painful and verbose and we can avoid this by just templating the entire array type as is done here.

NOTE: This function will convert from base type to derived types as well.

NOTE: This function will perform dynamic memory allocation in the creation of the returned Array<Ptr<T_out> > object. However, this should not be a significant performance disadvantage because typically any class type that you would manipulate through an RCP or Ptr object would tend to be larger an more complex so that such overhead would be small and insignificant.

Definition at line 116 of file Teuchos_ArrayConversions.hpp.

117 {
118  using Teuchos::as;
119  Array<Ptr<T_out> > a_out(a_in.size());
120  arrayViewPtrConv(a_in, a_out());
121  return a_out;
122 }
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
void arrayViewPtrConv(const ArrayPtrT_in &a_in, const ArrayView< Ptr< T_out > > &a_out)
Utility function to convert from an an input Array[View,RCP]<[const] PTR<T_in> > object to an output ...
Here is the call graph for this function:

◆ ArrayRCP_createNewDeallocRCPNodeRawPtr()

template<class T , class Dealloc_T >
RCPNode* Teuchos::ArrayRCP_createNewDeallocRCPNodeRawPtr ( T *  p,
Dealloc_T  dealloc,
bool  has_ownership_in 
)
inline

Definition at line 70 of file Teuchos_ArrayRCP.hpp.

73 {
74  return new RCPNodeTmpl<T,Dealloc_T>(p, dealloc, has_ownership_in);
75 }
mchunkptr p
Definition: g++malloc.c:1207
Here is the caller graph for this function:

◆ ArrayRCP_createNewRCPNodeRawPtr()

template<class T >
RCPNode* Teuchos::ArrayRCP_createNewRCPNodeRawPtr ( T *  p,
bool  has_ownership_in 
)
inline

Definition at line 60 of file Teuchos_ArrayRCP.hpp.

61 {
62  return new RCPNodeTmpl<T,DeallocArrayDelete<T> >(
63  p, DeallocArrayDelete<T>(), has_ownership_in
64  );
65 }
mchunkptr p
Definition: g++malloc.c:1207
Here is the caller graph for this function:

◆ arrayRcpConv()

template<class T_out , class ArrayPtrT_in >
Array<RCP<T_out> > Teuchos::arrayRcpConv ( const ArrayPtrT_in &  a_in)

Utility function to convert any Array[View,RCP]<[const] RCP<T_in> > object to an Array<RCP<T_out> > object.

Similar to the function arrayPtrConv() except this function returns Array<RCP<T_out> > objects instead of Array<Ptr<T_out> > objects.

Definition at line 132 of file Teuchos_ArrayConversions.hpp.

133 {
134  using Teuchos::as;
135  Array<RCP<T_out> > a_out(a_in.size());
136  arrayViewRcpConv(a_in, a_out());
137  return a_out;
138 }
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
void arrayViewRcpConv(const ArrayPtrT_in &a_in, const ArrayView< RCP< T_out > > &a_out)
Utility function to convert from an input Array[View,RCP]<[const] RCP<T_in> > object to an output Arr...
Here is the call graph for this function:

◆ arrayViewPtrConv()

template<class ArrayPtrT_in , class T_out >
void Teuchos::arrayViewPtrConv ( const ArrayPtrT_in &  a_in,
const ArrayView< Ptr< T_out > > &  a_out 
)

Utility function to convert from an an input Array[View,RCP]<[const] PTR<T_in> > object to an output ArrayView<Ptr<T_out> > object.

Definition at line 63 of file Teuchos_ArrayConversions.hpp.

65 {
66  using Teuchos::as;
67 #ifdef TEUCHOS_DEBUG
68  TEUCHOS_ASSERT_EQUALITY(as<Teuchos_Ordinal>(a_in.size()),
69  as<Teuchos_Ordinal>(a_out.size()));
70 #endif
71  for (Teuchos_Ordinal i = 0; i < as<Teuchos_Ordinal>(a_in.size()); ++i) {
72  a_out[i] = a_in[i].ptr();
73  }
74 }
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
int i
Definition: parse.c:193
TEUCHOS_ORDINAL_TYPE Teuchos_Ordinal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ arrayViewRcpConv()

template<class ArrayPtrT_in , class T_out >
void Teuchos::arrayViewRcpConv ( const ArrayPtrT_in &  a_in,
const ArrayView< RCP< T_out > > &  a_out 
)

Utility function to convert from an input Array[View,RCP]<[const] RCP<T_in> > object to an output ArrayView<RCP<T_out> > object.

Definition at line 81 of file Teuchos_ArrayConversions.hpp.

83 {
84  using Teuchos::as;
85 #ifdef TEUCHOS_DEBUG
86  TEUCHOS_ASSERT_EQUALITY(as<Teuchos_Ordinal>(a_in.size()),
87  as<Teuchos_Ordinal>(a_out.size()));
88 #endif
89  for (Teuchos_Ordinal i = 0; i < as<Teuchos_Ordinal>(a_in.size()); ++i) {
90  a_out[i] = a_in[i];
91  }
92 }
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
int i
Definition: parse.c:193
TEUCHOS_ORDINAL_TYPE Teuchos_Ordinal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ as()

template<class TypeTo , class TypeFrom >
TypeTo Teuchos::as ( const TypeFrom &  t)
inline

Convert from one value type to another.

Template Parameters
TypeToThe type to which to convert; the output type.
TypeFromThe type from which to convert; the input type.

User documentation

This template function lets you convert from one value type to another, possibly with checks for overflow (where appropriate) in a debug build of Teuchos. For example, to convert between int and double:

double d = 3.14;
int i = Teuchos::as<double> (d);
assert (i == 3);

In a debug build of Teuchos, this will check for overflow, since there are some double-precision floating-point values that do not fit in a 32-bit integer. In a release build, this will not check for overflow. You are responsible for knowing the difference. If you always want to check for overflow (e.g., to validate user input), use the asSafe() function. Note that conversion from a floating-point number to an integer, or from a higher-precision floating-point number to a lower-precision floating-point number, may truncate or round (as it does in the above example). We do not check for truncation or rounding.

"Debug build of Teuchos" means more than just building with debug compiler flags. It means debug checking was turned on when Trilinos was built. If you are building Trilinos yourself, you may turn on debug checking by setting the Trilinos_ENABLE_DEBUG CMake configure option to ON (rather than OFF, which is the default). Note that enabling debug checking affects other operations in Teuchos besides this conversion, and may have a significant run-time cost, especially for RCP and ArrayRCP.

The IEEE 754 standard defines the result of conversions from a larger to a smaller built-in floating-point type, including double to float, long double to float, and long double to double. Such conversions might overflow (result in a value too large in magnitude to fit in the target type) or underflow (result in a value too small to fit in a normalized value of the target type). We never check for overflow or underflow for these conversions. Their behavior depends on the current rounding mode and whether your hardware and compiler correctly implement denormalized values. Typically, overflow results in an Inf of the same sign as the input, and underflow results in either a denormalized value or zero. If you want to do bounds checking, you should set the appropriate trap so that overflow or underflow will raise the SIGFPE signal. Please refer to the IEEE 754 standard for details. Note that debug-mode as() conversions from e.g., std::string to built-in floating-point types still check for overflow.

Note
We cannot promise that converting from a type T1 to another type T2 and back again will result in the same T1 value with which we started. For example, converting from a long long to a double may result in truncation, since long long has 63 bits of significand and double has 53.

Developer documentation

This function uses the traits class ValueTypeConversionTraits to perform checking and conversion. If debug checking is turned on, this function uses the traits class' safeConvert() method to perform possibly checked conversion. Otherwise, it uses the traits class' convert() method for unchecked conversion.

If you want to specialize this function's behavior, you should specialize ValueTypeConversionTraits for your combination of input and output types (TypeFrom resp. TypeTo). Be sure to define the specialization in the Teuchos namespace. We provide specializations of ValueTypeConversionTraits in this file for a variety of types. You must define both safeConvert() and convert() in the specialization, since as() will call safeConvert() in a debug build and convert() in a release build.

Note
The implementations below do not consider truncation of floating-point values to be unsafe conversion. For example, converting from a long long (63 bits of significand) to a double (53 bits of significand) may result in truncation, but we do not consider this unsafe. "Unsafe" mainly refers to overflow or lack of representation.

Definition at line 2852 of file Teuchos_as.hpp.

2853 {
2854 #ifdef HAVE_TEUCHOS_DEBUG
2855  return ValueTypeConversionTraits<TypeTo,TypeFrom>::safeConvert(t);
2856 #else
2857  return ValueTypeConversionTraits<TypeTo,TypeFrom>::convert(t);
2858 #endif // HAVE_TEUCHOS_DEBUG
2859 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ asSafe()

template<class TypeTo , class TypeFrom >
TypeTo Teuchos::asSafe ( const TypeFrom &  t)
inline

Convert from one value type to another, with validity checks if appropriate.

Template Parameters
TypeToThe type to which to convert; the output type.
TypeFromThe type from which to convert; the input type.

User documentation

This template function lets you convert from one value type to another. For example, to convert between int and double:

double d = 3.14;
int i = Teuchos::asSafe<double> (d);
assert (i == 3);

This function always checks for validity of the conversion before attempting it. Examples of invalid conversions are those which would overflow, for example from double to int, if the double-precision floating-point input is bigger than the largest int or smaller than the smallest int. If you only which to check in a debug build, use the as() function instead. Note that conversion from a floating-point number to an integer, or from a higher-precision floating-point number to a lower-precision floating-point number, may truncate or round (as it does in the above example).

The IEEE 754 standard defines the result of conversions from a larger to a smaller built-in floating-point type, including double to float, long double to float, and long double to double. Such conversions might overflow (result in a value too large in magnitude to fit in the target type) or underflow (result in a value too small to fit in a normalized value of the target type). We never check for overflow or underflow for these conversions. Their behavior depends on the current rounding mode and whether your hardware and compiler correctly implement denormalized values. Typically, overflow results in an Inf of the same sign as the input, and underflow results in either a denormalized value or zero. If you want to do bounds checking, you should set the appropriate trap so that overflow or underflow will raise the SIGFPE signal. Please refer to the IEEE 754 standard for details. Note that asSafe() conversions from e.g., std::string to built-in floating-point types still check for overflow.

Developer documentation

This function uses the traits class ValueTypeConversionTraits to perform the actual checking and conversion. It always uses the traits class' safeConvert() method to perform a possibly checked conversion.

If you want to specialize this function's behavior, you should specialize ValueTypeConversionTraits for your combination of input and output types (TypeFrom resp. TypeTo). Be sure to define the specialization in the Teuchos namespace. We provide specializations of ValueTypeConversionTraits for a variety of types.

Note
The implementations below do not consider truncation of floating-point values to be unsafe conversion. For example, converting from a long long (63 bits of significand) to a double (53 bits of significand) may result in truncation, but we do not consider this unsafe. "Unsafe" mainly refers to overflow or lack of representation.

Definition at line 2862 of file Teuchos_as.hpp.

2863 {
2864  return ValueTypeConversionTraits<TypeTo,TypeFrom>::safeConvert(t);
2865 }
Here is the call graph for this function:

◆ BASIC_DEPENDENCY_TEST() [1/4]

Teuchos::BASIC_DEPENDENCY_TEST ( readinDep1  ,
ConditionVisualDependency  ,
,
 
)
Here is the caller graph for this function:

◆ BASIC_DEPENDENCY_TEST() [2/4]

Teuchos::BASIC_DEPENDENCY_TEST ( readinDep2  ,
ConditionVisualDependency  ,
,
 
)

◆ BASIC_DEPENDENCY_TEST() [3/4]

Teuchos::BASIC_DEPENDENCY_TEST ( readinDep1  ,
StringValidatorDependency  ,
,
 
)

◆ BASIC_DEPENDENCY_TEST() [4/4]

Teuchos::BASIC_DEPENDENCY_TEST ( readinDep2  ,
StringValidatorDependency  ,
,
 
)

◆ basicRCPNode()

template<class T >
RCPNode* Teuchos::basicRCPNode ( const bool  has_ownership,
T **  p_out = 0 
)

Definition at line 74 of file RCPNodeHandle_UnitTests.cpp.

75 {
76  T *p = new T;
77  if (p_out)
78  *p_out = p;
79  RCPNode *rcpNode = basicRCPNodeNoAlloc<T>(p, has_ownership);
80  return rcpNode;
81 }
mchunkptr p
Definition: g++malloc.c:1207
Here is the caller graph for this function:

◆ basicRCPNodeHandle()

template<class T >
RCPNodeHandle Teuchos::basicRCPNodeHandle ( const bool  has_ownership,
T **  p_out = 0 
)

Definition at line 95 of file RCPNodeHandle_UnitTests.cpp.

96 {
97  T *p = 0;
98  RCPNode *rcpNode = basicRCPNode(has_ownership, &p);
99  if (p_out)
100  *p_out = p;
101 #ifdef TEUCHOS_DEBUG
102  return RCPNodeHandle(rcpNode, p, typeName(*p), concreteTypeName(*p), has_ownership);
103 #else
104  return RCPNodeHandle(rcpNode);
105 #endif
106 }
RCPNode * basicRCPNode(const bool has_ownership, T **p_out=0)
std::string concreteTypeName(const T &t)
Template function for returning the type name of the actual concrete name of a passed-in object...
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.
mchunkptr p
Definition: g++malloc.c:1207
Here is the call graph for this function:

◆ basicRCPNodeNoAlloc()

template<class T >
RCPNode* Teuchos::basicRCPNodeNoAlloc ( T *  p,
const bool  has_ownership 
)

Definition at line 65 of file RCPNodeHandle_UnitTests.cpp.

66 {
67  RCPNodeTmpl<T,DeallocDelete<T> > *rcpNode =
68  new RCPNodeTmpl<T,DeallocDelete<T> >(p, DeallocDelete<T>(), has_ownership);
69  return rcpNode;
70 }
mchunkptr p
Definition: g++malloc.c:1207

◆ BIN_CON_TEST()

Teuchos::BIN_CON_TEST ( AndCondition  )

◆ broadcast() [1/2]

template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view<ViewType>::value)>::type Teuchos::broadcast ( const Comm< Ordinal > &  comm,
const int  rootRank,
const Ordinal  count,
const ViewType &  buffer 
)

Definition at line 212 of file Kokkos_TeuchosCommAdapters.hpp.

216 {
217  broadcast( comm, rootRank, count, buffer.ptr_on_device() );
218 }
int count
Definition: lp_lib.h:819
void broadcast(const Comm< Ordinal > &comm, const int rootRank, const Ordinal count, Packet buffer[])
Broadcast array of objects that use value semantics.
Here is the caller graph for this function:

◆ broadcast() [2/2]

template<typename Ordinal , class ViewType , typename Serializer >
std::enable_if<(Kokkos::Impl::is_view<ViewType>::value)>::type Teuchos::broadcast ( const Comm< Ordinal > &  comm,
const Serializer serializer,
const int  rootRank,
const Ordinal  count,
const ViewType &  buffer 
)

Definition at line 224 of file Kokkos_TeuchosCommAdapters.hpp.

229 {
230  broadcast( comm, serializer, rootRank, count, buffer.ptr_on_device() );
231 }
int count
Definition: lp_lib.h:819
void broadcast(const Comm< Ordinal > &comm, const int rootRank, const Ordinal count, Packet buffer[])
Broadcast array of objects that use value semantics.
Here is the call graph for this function:

◆ compareArrays()

template<class Array1 , class Array2 >
bool Teuchos::compareArrays ( const Array1 &  a1,
const std::string &  a1_name,
const Array2 &  a2,
const std::string &  a2_name,
Teuchos::FancyOStream out 
)

Compare if two array objects are the same or not.

This function works with any two array objects are the same size and have the same element value types. The funtion is templated on the container types and therefore can compare any two objects that have size() and operator[](i) defined.

Returns
Returns true if the compare and false otherwise.

Definition at line 625 of file Teuchos_TestingHelpers.hpp.

630 {
631  using Teuchos::as;
632  bool success = true;
633 
634  out << "Comparing " << a1_name << " == " << a2_name << " ... ";
635 
636  const int n = a1.size();
637 
638  // Compare sizes
639  if (as<int>(a2.size()) != n) {
640  out << "\nError, "<<a1_name<<".size() = "<<a1.size()<<" == "
641  << a2_name<<".size() = "<<a2.size()<<" : failed!\n";
642  return false;
643  }
644 
645  // Compare elements
646  for( int i = 0; i < n; ++i ) {
647  const bool result = ( a1[i] == a2[i] ); // Tests C::operator[](i) const
648  if (!result) {
649  out << "\nError, "<<a1_name<<"["<<i<<"] = "<<a1[i]<<" == "
650  << a2_name<<"["<<i<<"] = "<<a2[i]<<": failed!\n";
651  success = false;
652  }
653  }
654  if (success) {
655  out << "passed\n";
656  }
657 
658  return success;
659 
660 }
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
void ma57int * n
int i
Definition: parse.c:193
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compareFloatingArrays()

template<class Array1 , class Array2 , class ScalarMag >
bool Teuchos::compareFloatingArrays ( const Array1 &  a1,
const std::string &  a1_name,
const Array2 &  a2,
const std::string &  a2_name,
const ScalarMag &  tol,
Teuchos::FancyOStream out 
)

Compare if two array objects are the same or not up to a relative floating point precision.

This function works with any two array objects are the same size and have the same element value types. The funtion is templated on the container types and therefore can compare any two objects that have size() and operator[](i) defined.

Returns
Returns true if the compare and false otherwise.

Definition at line 664 of file Teuchos_TestingHelpers.hpp.

670 {
671  using Teuchos::as;
672  bool success = true;
673 
674  out << "Comparing " << a1_name << " == " << a2_name << " ... ";
675 
676  const int n = a1.size();
677 
678  // Compare sizes
679  if (as<int>(a2.size()) != n) {
680  out << "\nError, "<<a1_name<<".size() = "<<a1.size()<<" == "
681  << a2_name<<".size() = "<<a2.size()<<" : failed!\n";
682  return false;
683  }
684 
685  // Compare elements
686  for( int i = 0; i < n; ++i ) {
687  const ScalarMag err = relErr( a1[i], a2[i] );
688  if ( !(err <= tol) ) {
689  out
690  <<"\nError, relErr("<<a1_name<<"["<<i<<"],"
691  <<a2_name<<"["<<i<<"]) = relErr("<<a1[i]<<","<<a2[i]<<") = "
692  <<err<<" <= tol = "<<tol<<": failed!\n";
693  success = false;
694  }
695  }
696  if (success) {
697  out << "passed\n";
698  }
699 
700  return success;
701 
702 }
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
ScalarTraits< Scalar >::magnitudeType relErr(const Scalar &s1, const Scalar &s2)
Return relative error of two scalars.
void ma57int * n
int i
Definition: parse.c:193
Here is the call graph for this function:
Here is the caller graph for this function:

◆ concreteTypeName()

template<typename T >
std::string Teuchos::concreteTypeName ( const T &  t)

Template function for returning the type name of the actual concrete name of a passed-in object.

Uses the traits class TypeNameTraits so the behavior of this function can be specialized in every possible way.

Definition at line 136 of file Teuchos_TypeNameTraits.hpp.

137 {
138  typedef typename ConstTypeTraits<T>::NonConstType ncT;
139  return TypeNameTraits<ncT>::concreteName(t);
140 }
Here is the caller graph for this function:

◆ convertXmlToYaml() [1/2]

std::string Teuchos::convertXmlToYaml ( const std::string &  xmlFileName)

Definition at line 114 of file Teuchos_YamlParser.cpp.

115 {
116  //load the parameter list from xml
117  Teuchos::RCP<Teuchos::ParameterList> toConvert = Teuchos::getParametersFromXmlFile(xmlFileName);
118  //replace the file extension ".xml" with ".yaml", or append it if there was no extension
119  std::string yamlFileName;
120  if(xmlFileName.find(".xml") == std::string::npos)
121  {
122  yamlFileName = xmlFileName + ".yaml";
123  }
124  else
125  {
126  yamlFileName = xmlFileName.substr(0, xmlFileName.length() - 4) + ".yaml";
127  }
128  YAMLParameterList::writeYamlFile(yamlFileName, toConvert);
129  return yamlFileName;
130 }
void writeYamlFile(const std::string &yamlFile, Teuchos::RCP< Teuchos::ParameterList > &pl)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ convertXmlToYaml() [2/2]

void Teuchos::convertXmlToYaml ( const std::string &  xmlFileName,
const std::string &  yamlFileName 
)

Definition at line 132 of file Teuchos_YamlParser.cpp.

133 {
134  //load the parameter list from xml
135  Teuchos::RCP<Teuchos::ParameterList> toConvert = Teuchos::getParametersFromXmlFile(xmlFileName);
136  //replace the file extension ".xml" with ".yaml", or append it if there was no extension
137  YAMLParameterList::writeYamlFile(yamlFileName, toConvert);
138 }
void writeYamlFile(const std::string &yamlFile, Teuchos::RCP< Teuchos::ParameterList > &pl)
Here is the call graph for this function:

◆ createMainPL()

ParameterList Teuchos::createMainPL ( )

Definition at line 84 of file ParameterList_UnitTests.cpp.

85 {
86  ParameterList PL_Main("PL_Main");
87  const std::string Direction_Doc = "This sublist controls how direction is computed.";
88  ParameterList &PL_Direction = PL_Main.sublist("Direction", false, Direction_Doc);
89  ParameterList &PL_Newton = PL_Direction.sublist("Newton");
90  PL_Newton.sublist("Linear Solver");
91  PL_Main.sublist("Line Search");
92  return PL_Main;
93 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createOp()

template<typename Ordinal , typename Packet >
ValueTypeReductionOp<Ordinal,Packet>* Teuchos::createOp ( const EReductionType  reductType)

Definition at line 1137 of file Teuchos_CommHelpers.hpp.

1138 {
1139  typedef ScalarTraits<Packet> ST;
1140  switch (reductType) {
1141  case REDUCE_SUM: {
1142  return new SumValueReductionOp<Ordinal,Packet> ();
1143  }
1144  case REDUCE_MIN: {
1145  TEUCHOS_TEST_FOR_EXCEPTION(
1146  ! ST::isComparable, std::invalid_argument, "Teuchos::createOp"
1147  "(EReductionType): The Packet type " << TypeNameTraits<Packet>::name ()
1148  << " is not less-than comparable, so it does not make sense to do a "
1149  "MIN reduction with it.");
1150  return new MinValueReductionOp<Ordinal,Packet> ();
1151  }
1152  case REDUCE_MAX: {
1153  TEUCHOS_TEST_FOR_EXCEPTION(
1154  ! ST::isComparable, std::invalid_argument, "Teuchos::createOp"
1155  "(EReductionType): The Packet type " << TypeNameTraits<Packet>::name ()
1156  << " is not less-than comparable, so it does not make sense to do a "
1157  "MAX reduction with it.");
1158  return new MaxValueReductionOp<Ordinal,Packet> ();
1159  }
1160  case REDUCE_AND: {
1161  return new ANDValueReductionOp<Ordinal, Packet> ();
1162  }
1163  default:
1164  TEUCHOS_TEST_FOR_EXCEPTION(
1165  true, std::invalid_argument, "Teuchos::createOp(EReductionType): "
1166  "Invalid EReductionType value " << reductType << ". Valid values "
1167  "include REDUCE_SUM, REDUCE_MIN, REDUCE_MAX, and REDUCE_AND.");
1168  }
1169 }
char * name
Definition: lp_lib.h:823
Here is the call graph for this function:

◆ createSimpleObjectDB()

template<class T >
RCP<SimpleObjectDB<T> > Teuchos::createSimpleObjectDB ( )

Nonmember constructor.

Definition at line 209 of file Teuchos_SimpleObjectDB.hpp.

210 {
211  return rcp(new SimpleObjectDB<T>);
212 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
Here is the call graph for this function:

◆ createValidMainPL()

ParameterList Teuchos::createValidMainPL ( )

Definition at line 97 of file ParameterList_UnitTests.cpp.

98 {
99 
100  ParameterList PL_Main_valid("PL_Main_valid");
101  PL_Main_valid.setParameters(createMainPL());
102 
103  // Create a validator for the "Nonlinear Solver" parameter
104  setStringToIntegralParameter<int>(
105  "Nonlinear Solver",
106  "Line Search Based",
107  "Selects the type of nonlinear solver to use",
108  tuple<std::string>("Line Search Based","Trust Region Based"),
109  &PL_Main_valid
110  );
111 
112  // Create a validator for the parameter "Line Search"->"Polynomial"->"Max Iters"
113  // that accepts an 'int', a 'double' or a 'std::string' value!
116  linesearchMaxItersValiator = rcp(
119  AcceptedTypes(false).allowInt(true).allowDouble(true).allowString(true)
120  )
121  );
122  PL_Main_valid.sublist("Line Search").sublist("Polynomial").set(
123  "Max Iters",3
124  ,"The maximum number of inner linear search iterations allowed."
125  ,linesearchMaxItersValiator
126  );
127 
128  // Create a validator for the parameter "Direction"->"Newton"->"Linear Solver"->"Tol"
129  // that accepts a 'double' or a 'std::string' value!
132  linSolveTolValidator = rcp(
135  AcceptedTypes(false).allowDouble(true).allowString(true)
136  )
137  );
138  PL_Main_valid.sublist("Direction",true).sublist("Newton",true)
139  .sublist("Linear Solver",true).set(
140  "Tol", double(1e-5)
141  ,"Select the linear solve tolerance"
142  ,linSolveTolValidator
143  );
144 
145  return PL_Main_valid;
146 
147 }
void e()
Standard implementation of a ParameterEntryValidator that accepts numbers from a number of different ...
ParameterList createMainPL()
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
Smart reference counting pointer class for automatic garbage collection.
Determines the types that are accepted.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ debugAssertStrength()

void Teuchos::debugAssertStrength ( ERCPStrength  strength)
inline

Definition at line 85 of file Teuchos_RCPNode.hpp.

86 {
87 #ifdef TEUCHOS_DEBUG
88  switch (strength) {
89  case RCP_STRONG:
90  // fall through
91  case RCP_WEAK:
92  return; // Fine
93  default:
94  TEUCHOS_TEST_FOR_EXCEPTION(
95  true, std::logic_error, "Teuchos::RCPNode: ERCPStrength enum value "
96  << strength << " is invalid (neither RCP_STRONG = " << RCP_STRONG
97  << " nor RCP_WEAK = " << RCP_WEAK << ").");
98  }
99 #else
100  (void) strength; // Silence "unused variable" compiler warning.
101 #endif // TEUCHOS_DEBUG
102 }
GC_API void(GC_CALLBACK *GC_same_obj_print_proc)(void *
Here is the call graph for this function:
Here is the caller graph for this function:

◆ defaultSmallNumber()

template<class Scalar >
Scalar Teuchos::defaultSmallNumber ( )

Definition at line 141 of file Teuchos_TestingHelpers.hpp.

142 {
143  const bool hasMachineParameters = ScalarTraits<Scalar>::hasMachineParameters;
144  return RelErrSmallNumber<hasMachineParameters,Scalar>::smallNumber();
145 }
static const bool hasMachineParameters
Determines if scalar type have machine-specific parameters (i.e. eps(), sfmin(), base(), prec(), t(), rnd(), emin(), rmin(), emax(), rmax() are supported).
Here is the call graph for this function:

◆ deleteRCPNode()

void Teuchos::deleteRCPNode ( RCPNode **  node)

Definition at line 84 of file RCPNodeHandle_UnitTests.cpp.

85 {
86  TEUCHOS_ASSERT(node);
87  TEUCHOS_ASSERT(*node);
88  (*node)->delete_obj();
89  delete (*node);
90  *node = 0;
91 }
Here is the caller graph for this function:

◆ demangleName()

std::string Teuchos::demangleName ( const std::string &  mangledName)

Demangle a C++ name if valid.

The name must have come from typeid(...).name() in order to be valid name to pass to this function.

Definition at line 53 of file Teuchos_TypeNameTraits.cpp.

54 {
55 #if defined(HAVE_GCC_ABI_DEMANGLE) && defined(HAVE_TEUCHOS_DEMANGLE)
56  int status;
57  char* _demangledName = abi::__cxa_demangle (mangledName.c_str (), 0, 0, &status);
58  if (status != 0 || 0 == _demangledName) {
59 #ifdef TEUCHOS_DEBUG
60  // In a debug build, we check if demangling succeeded.
61  std::string nullstr ("NULL");
62  const char* demangle_output = _demangledName ? _demangledName : nullstr.c_str ();
63  using std::endl;
64  TEUCHOS_TEST_FOR_EXCEPTION(
65  true, std::logic_error,
66  "Error, name demangling with g++ has been enabled but the function "
67  "abi::__cxa_demangle(" << mangledName << ") returned returnVal = " <<
68  demangle_output <<" and status = " << status << "." << endl << "This "
69  "suggests that name demangling may be broken on this platform." << endl
70  << "You may prevent this exception from being thrown in the future by "
71  "turning off name demangling for this build at configure time." << endl
72  << "Do this by setting the CMake configuration option "
73  "Teuchos_ENABLE_GCC_DEMANGLE to OFF." << endl << "Add the following to "
74  "your list of CMake options:" << endl << endl <<
75  " -D Teuchos_ENABLE_GCC_DEMANGLE:BOOL=OFF" << endl);
76 #endif
77  if (_demangledName != NULL) {
78  // The C library standard requires that free() do the right
79  // thing with NULL input, but it doesn't hurt to check.
80  free (_demangledName);
81  }
82  return (mangledName + "<demangle-failed>");
83  }
84  const std::string demangledName (_demangledName);
85  free (_demangledName); // We have to free this before we return!
86  return demangledName;
87 #else
88  return mangledName;
89 #endif
90 }
void free(void *)
Definition: malloc.c:676
UA_StatusCode status
Definition: open62541.c:787
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpBuffer()

template<typename Ordinal , typename T >
void Teuchos::dumpBuffer ( const std::string &  funcName,
const std::string &  buffName,
const Ordinal  bytes,
const T  buff[] 
)

Definition at line 107 of file Teuchos_DefaultMpiComm.hpp.

111 {
114  Teuchos::OSTab tab(out);
115  *out
116  << "\n" << funcName << "::" << buffName << ":\n";
117  tab.incrTab();
118  for( Ordinal i = 0; i < bytes; ++i ) {
119  *out << buffName << "[" << i << "] = '" << buff[i] << "'\n";
120  }
121  *out << "\n";
122 }
Teuchos_Ordinal Ordinal
Tabbing class for helping to create formated, indented output for a basic_FancyOStream object...
Definition: enough.c:109
static RCP< FancyOStream > getDefaultOStream()
Get the default output stream object.
Smart reference counting pointer class for automatic garbage collection.
int i
Definition: parse.c:193
RCP< basic_FancyOStream< CharT, Traits > > tab(const RCP< basic_FancyOStream< CharT, Traits > > &out, const int tabs=1, const std::basic_string< CharT, Traits > linePrefix="")
Create a tab for an RCP-wrapped basic_FancyOStream object to cause the indentation of all output auto...
Here is the call graph for this function:

◆ dyn_cast()

template<class T_To , class T_From >
T_To& Teuchos::dyn_cast ( T_From &  from)
inline

Dynamic casting utility function meant to replace dynamic_cast<T&> by throwing a better documented error message.

Existing uses of the built-in dynamic_cast<T&>() operator such as:

C &c = dynamic_cast<C&>(a);

are easily replaced as:

C &c = dyn_cast<C>(a);

and that is it. One could write a perl script to do this automatically.

This utility function is designed to cast an object reference of type T_From to type T_To and if the cast fails at runtime then an std::exception (derived from std::bad_cast) is thrown that contains a very good error message.

Consider the following class hierarchy:

class A {};
class B : public A {};
class C : public A {};

Now consider the following program:

int main( int argc, char* argv[] ) {
B b;
A &a = b;
try {
std::cout << "\nTrying: dynamic_cast<C&>(a);\n";
dynamic_cast<C&>(a);
}
catch( const std::bad_cast &e ) {
std::cout << "\nCaught std::bad_cast std::exception e where e.what() = \"" << e.what() << "\"\n";
}
try {
std::cout << "\nTrying: Teuchos::dyn_cast<C>(a);\n";
}
catch( const std::bad_cast &e ) {
std::cout << "\nCaught std::bad_cast std::exception e where e.what() = \"" << e.what() << "\"\n";
}
return 0;
}

The above program will print something that looks like (compiled with g++ for example):

 Trying: dynamic_cast<C&>(a);

 Caught std::bad_cast std::exception e where e.what() = "St8bad_cast"

 Trying: Teuchos::dyn_cast<C>(a);

 Caught std::bad_cast std::exception e where e.what() = "../../../../packages/teuchos/src/Teuchos_dyn_cast.cpp:46: true:
 dyn_cast<1C>(1A) : Error, the object with the concrete type '1B' (passed in through the interface type '1A')  does
 not support the interface '1C' and the dynamic cast failed!"

The above program shows that the standard implementation of dynamic_cast<T&>() does not return any useful debugging information at all but the templated function Teuchos::dyn_cast<T>() returns all kinds of useful information. The generated error message gives the type of the interface that the object was passed in as (i.e. A), what the actual concrete type of the object is (i.e. B) and what type is trying to be dynamically casted to (i.e. C). This type of information is extremely valuable when trying to track down these type of runtime dynamic casting errors. In some cases (such as with gdb), debuggers do not even give the type of concrete object so this function is very important on these platforms. In many cases, a debugger does not even need to be opened to diagnose what the problem is and how to fix it.

Note that this function is inlined and does not incur any significant runtime performance penalty over the raw dynamic_cast<T&>() operator.

Definition at line 173 of file Teuchos_dyn_cast.hpp.

174 {
175  T_To *to_ = dynamic_cast<T_To*>(&from);
176  if(!to_)
179  typeName(from),
181  );
182  return *to_;
183 }
TEUCHOSCORE_LIB_DLL_EXPORT void dyn_cast_throw_exception(const std::string &T_from, const std::string &T_from_concr, const std::string &T_to)
char * name
Definition: lp_lib.h:823
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dyn_cast_throw_exception()

void Teuchos::dyn_cast_throw_exception ( const std::string &  T_from,
const std::string &  T_from_concr,
const std::string &  T_to 
)

We throw a m_bad_cast, which is a subclass of bad_cast. This is necessary, since bad_cast lacks the appropriate constructor for use with the TEUCHOS_TEST_FOR_EXCEPTION macro.

Definition at line 49 of file Teuchos_dyn_cast.cpp.

54 {
55  TEUCHOS_TEST_FOR_EXCEPTION(
56  true, m_bad_cast
57  ,"dyn_cast<" << T_to << ">(" << T_from
58  << ") : Error, the object with the concrete type \'"
59  << T_from_concr << "\' (passed in through the interface type \'" << T_from << "\') "
60  " does not support the interface \'"
61  << T_to << "\' and the dynamic cast failed!" );
62 }
Here is the caller graph for this function:

◆ enumIstreamExtractor()

template<class EnumType >
std::istream& Teuchos::enumIstreamExtractor ( std::istream &  std_is,
EnumType &  enum_value 
)

Definition at line 58 of file Teuchos_iostream_helpers.hpp.

59 {
60  int intval;
61  std_is >> intval;
62  enum_value = static_cast<EnumType>(intval);
63  return std_is;
64 }

◆ erase()

entryIDsMap Teuchos::erase ( dependentParam  )
Here is the caller graph for this function:

◆ FULL_NUMBER_TYPE_TEST()

Teuchos::FULL_NUMBER_TYPE_TEST ( int  )
Here is the caller graph for this function:

◆ gather< int, int >() [1/2]

template<>
void Teuchos::gather< int, int > ( const int  sendBuf[],
const int  sendCount,
int  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1475 of file Teuchos_CommHelpers.cpp.

1481 {
1482  gatherImpl<int> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1483 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, int >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gather< int, int > ( const int  sendBuf[],
const int  sendCount,
int  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1475 of file Teuchos_CommHelpers.cpp.

1481 {
1482  gatherImpl<int> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1483 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, long >() [1/2]

template<>
void Teuchos::gather< int, long > ( const long  sendBuf[],
const int  sendCount,
long  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1288 of file Teuchos_CommHelpers.cpp.

1294 {
1295  gatherImpl<long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1296 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gather< int, long > ( const long  sendBuf[],
const int  sendCount,
long  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1288 of file Teuchos_CommHelpers.cpp.

1294 {
1295  gatherImpl<long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1296 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, long long >() [1/2]

template<>
void Teuchos::gather< int, long long > ( const long long  sendBuf[],
const int  sendCount,
long long  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1099 of file Teuchos_CommHelpers.cpp.

1105 {
1106  gatherImpl<long long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1107 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, long long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gather< int, long long > ( const long long  sendBuf[],
const int  sendCount,
long long  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1099 of file Teuchos_CommHelpers.cpp.

1105 {
1106  gatherImpl<long long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1107 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, short >() [1/2]

template<>
void Teuchos::gather< int, short > ( const short  sendBuf[],
const int  sendCount,
short  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1689 of file Teuchos_CommHelpers.cpp.

1695 {
1696  gatherImpl<short> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1697 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, short >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gather< int, short > ( const short  sendBuf[],
const int  sendCount,
short  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1689 of file Teuchos_CommHelpers.cpp.

1695 {
1696  gatherImpl<short> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1697 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, unsigned int >() [1/2]

template<>
void Teuchos::gather< int, unsigned int > ( const unsigned int  sendBuf[],
const int  sendCount,
unsigned int  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1595 of file Teuchos_CommHelpers.cpp.

1601 {
1602  gatherImpl<unsigned int> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1603 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, unsigned int >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gather< int, unsigned int > ( const unsigned int  sendBuf[],
const int  sendCount,
unsigned int  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1595 of file Teuchos_CommHelpers.cpp.

1601 {
1602  gatherImpl<unsigned int> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1603 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, unsigned long >() [1/2]

template<>
void Teuchos::gather< int, unsigned long > ( const unsigned long  sendBuf[],
const int  sendCount,
unsigned long  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1382 of file Teuchos_CommHelpers.cpp.

1388 {
1389  gatherImpl<unsigned long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1390 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, unsigned long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gather< int, unsigned long > ( const unsigned long  sendBuf[],
const int  sendCount,
unsigned long  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1382 of file Teuchos_CommHelpers.cpp.

1388 {
1389  gatherImpl<unsigned long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1390 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, unsigned long long >() [1/2]

template<>
void Teuchos::gather< int, unsigned long long > ( const unsigned long long  sendBuf[],
const int  sendCount,
unsigned long long  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1192 of file Teuchos_CommHelpers.cpp.

1198 {
1199  gatherImpl<unsigned long long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1200 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gather< int, unsigned long long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gather< int, unsigned long long > ( const unsigned long long  sendBuf[],
const int  sendCount,
unsigned long long  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1192 of file Teuchos_CommHelpers.cpp.

1198 {
1199  gatherImpl<unsigned long long> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1200 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, int >() [1/2]

template<>
void Teuchos::gatherv< int, int > ( const int  sendBuf[],
const int  sendCount,
int  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1487 of file Teuchos_CommHelpers.cpp.

1494 {
1495  gathervImpl<int> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1496 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, int >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gatherv< int, int > ( const int  sendBuf[],
const int  sendCount,
int  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1487 of file Teuchos_CommHelpers.cpp.

1494 {
1495  gathervImpl<int> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1496 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, long >() [1/2]

template<>
void Teuchos::gatherv< int, long > ( const long  sendBuf[],
const int  sendCount,
long  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1300 of file Teuchos_CommHelpers.cpp.

1307 {
1308  gathervImpl<long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1309 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gatherv< int, long > ( const long  sendBuf[],
const int  sendCount,
long  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1300 of file Teuchos_CommHelpers.cpp.

1307 {
1308  gathervImpl<long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1309 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, long long >() [1/2]

template<>
void Teuchos::gatherv< int, long long > ( const long long  sendBuf[],
const int  sendCount,
long long  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1111 of file Teuchos_CommHelpers.cpp.

1118 {
1119  gathervImpl<long long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1120 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, long long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gatherv< int, long long > ( const long long  sendBuf[],
const int  sendCount,
long long  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1111 of file Teuchos_CommHelpers.cpp.

1118 {
1119  gathervImpl<long long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1120 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, short >() [1/2]

template<>
void Teuchos::gatherv< int, short > ( const short  sendBuf[],
const int  sendCount,
short  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1701 of file Teuchos_CommHelpers.cpp.

1708 {
1709  gathervImpl<short> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1710 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, short >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gatherv< int, short > ( const short  sendBuf[],
const int  sendCount,
short  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1701 of file Teuchos_CommHelpers.cpp.

1708 {
1709  gathervImpl<short> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1710 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, unsigned int >() [1/2]

template<>
void Teuchos::gatherv< int, unsigned int > ( const unsigned int  sendBuf[],
const int  sendCount,
unsigned int  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1607 of file Teuchos_CommHelpers.cpp.

1614 {
1615  gathervImpl<unsigned int> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1616 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, unsigned int >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gatherv< int, unsigned int > ( const unsigned int  sendBuf[],
const int  sendCount,
unsigned int  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1607 of file Teuchos_CommHelpers.cpp.

1614 {
1615  gathervImpl<unsigned int> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1616 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, unsigned long >() [1/2]

template<>
void Teuchos::gatherv< int, unsigned long > ( const unsigned long  sendBuf[],
const int  sendCount,
unsigned long  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1394 of file Teuchos_CommHelpers.cpp.

1401 {
1402  gathervImpl<unsigned long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1403 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, unsigned long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gatherv< int, unsigned long > ( const unsigned long  sendBuf[],
const int  sendCount,
unsigned long  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1394 of file Teuchos_CommHelpers.cpp.

1401 {
1402  gathervImpl<unsigned long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1403 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, unsigned long long >() [1/2]

template<>
void Teuchos::gatherv< int, unsigned long long > ( const unsigned long long  sendBuf[],
const int  sendCount,
unsigned long long  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1204 of file Teuchos_CommHelpers.cpp.

1211 {
1212  gathervImpl<unsigned long long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1213 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ gatherv< int, unsigned long long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::gatherv< int, unsigned long long > ( const unsigned long long  sendBuf[],
const int  sendCount,
unsigned long long  recvBuf[],
const int  recvCounts[],
const int  displs[],
const int  root,
const Comm< int > &  comm 
)

Definition at line 1204 of file Teuchos_CommHelpers.cpp.

1211 {
1212  gathervImpl<unsigned long long> (sendBuf, sendCount, recvBuf, recvCounts, displs, root, comm);
1213 }
local int root
Definition: enough.c:168
Here is the caller graph for this function:

◆ generic_real_isnaninf()

template<class Scalar >
bool Teuchos::generic_real_isnaninf ( const Scalar &  x)

Definition at line 123 of file Teuchos_ScalarTraits.hpp.

124 {
125 #ifdef HAVE_TEUCHOSCORE_CXX11
126  if (std::isnan(x)) return true;
127  if (std::isinf(x)) return true;
128  return false;
129 #else
130  typedef std::numeric_limits<Scalar> STD_NL;
131  // IEEE says this should fail for NaN (not all compilers do not obey IEEE)
132  const Scalar tol = 1.0; // Any (bounded) number should do!
133  if (!(x <= tol) && !(x > tol)) return true;
134  // Use fact that Inf*0 = NaN (again, all compilers do not obey IEEE)
135  Scalar z = static_cast<Scalar>(0.0) * x;
136  if (!(z <= tol) && !(z > tol)) return true;
137  // As a last result use comparisons
138  if (x == STD_NL::infinity() || x == -STD_NL::infinity()) return true;
139  // We give up and assume the number is finite
140  return false;
141 #endif
142 }
REAL * x
Definition: myblas.h:59

◆ getBaseObjVoidPtr()

template<typename T >
const void* Teuchos::getBaseObjVoidPtr ( T *  p)

Return a const void* pointing to the base of an object.

This function uses the boost::is_polymorphic traits class to determine if type T is a polymorphic type or a non-polymorphic and then calls dynamic_cast or static_cast, respectively, to return the base pointer to the object.

The base pointer to an object is crtical to know if you need to determine if two pointers are pointing to the same object or not.

NOTE: This function will not even be defined if HAS_TEUCHOS_GET_BASE_OBJ_VOID_PTR is not defined (which currently requires boost support but that may change later).

Definition at line 105 of file Teuchos_getBaseObjVoidPtr.hpp.

106 {
107 #if defined(HAVE_TEUCHOSCORE_CXX11)
108  const bool isPoly = std::is_polymorphic<T>::value;
109 #elif defined(HAVE_TEUCHOSCORE_BOOST) && defined(HAVE_TEUCHOSCORE_BOOST_IS_POLYMORPHIC)
110  const bool isPoly = boost::is_polymorphic<T>::value;
111 #endif
112  typedef GetBaseObjVoidPtrImpl<isPoly, T> GBOVPT;
114 }
const void * getBaseObjVoidPtr(T *p)
Return a const void* pointing to the base of an object.
REAL value
Definition: lp_lib.h:932
mchunkptr p
Definition: g++malloc.c:1207
Here is the caller graph for this function:

◆ getConst()

template<class T >
const T& Teuchos::getConst ( T &  t)
inline

Return a constant reference to an object given a non-const reference.

Template Parameters
TThe type (without const qualifier) to make const.

This template function provides a shorthand for

const_cast<const T&>(t) 

as

getConst(t) 

This saves you the trouble of typing the name of the class, and also saves readers of your code from looking at the (possibly long) class name.

Here is an example showing why you might want to use this function.

// A class with a very long name.
class MyVeryLongClassNameWhichIsIndeedQuiteLongIsItNot { ... };
// A function which takes a const reference to an instance of that class.
void f1 (const MyVeryLongClassNameWhichIsIndeedQuiteLongIsItNot& x)
// A function which takes a nonconst reference to an instance of that class,
// but needs to call f1, which takes a const reference.
void f2 (MyVeryLongClassNameWhichIsIndeedQuiteLongIsItNot& x) {
// ... do some stuff with x ...
// Call f1. Notice how few characters this takes,
// compared with a const_cast.
f1 (getConst (x));
// ... do other stuff ...
}

Definition at line 82 of file Teuchos_getConst.hpp.

82 { return t; }
test_type t
Definition: main.c:6
Here is the caller graph for this function:

◆ getInvertedObjOwnershipParent()

template<class ParentT , class T >
RCP<ParentT> Teuchos::getInvertedObjOwnershipParent ( const RCP< T > &  invertedChild)

Get the parent back from an inverted ownership RCP.

Retrieves the RCP<ParentT> object set through rcpWithInvertedObjOwnership().

Here is the caller graph for this function:

◆ getParametersFromYamlFile()

Teuchos::RCP< Teuchos::ParameterList > Teuchos::getParametersFromYamlFile ( const std::string &  yamlFileName)
related

Definition at line 108 of file Teuchos_YamlParser.cpp.

109 {
110  return YAMLParameterList::parseYamlFile(yamlFileName);
111 }
Teuchos::RCP< Teuchos::ParameterList > parseYamlFile(const std::string &yamlFile)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRawPtr()

template<class Container >
RawPointerConversionTraits<Container>::Ptr_t Teuchos::getRawPtr ( const Container &  c)

Definition at line 57 of file Teuchos_getRawPtr.hpp.

58 {
60 }
RawPointerConversionTraits< Container >::Ptr_t getRawPtr(const Container &c)
size_t jm_callbacks * c
Here is the caller graph for this function:

◆ getSimpleTestTwoDArray()

TwoDArray<int> Teuchos::getSimpleTestTwoDArray ( )

Definition at line 49 of file TwoDArray_UnitTests.cpp.

49  {
50  TwoDArray<int> simpleArray(2,2);
51  simpleArray(0,0) =1;
52  simpleArray(0,1) =2;
53  simpleArray(1,0) =3;
54  simpleArray(1,1) =4;
55  return simpleArray;
56 }
Here is the caller graph for this function:

◆ getStringToIntegralParameterEntryValidator()

template<class IntegralType >
RCP<const StringToIntegralParameterEntryValidator<IntegralType> > Teuchos::getStringToIntegralParameterEntryValidator ( ParameterEntry const &  entry,
ParameterList const &  paramList,
std::string const &  paramName 
)

Get a StringToIntegralParameterEntryValidator<IntegralType> object out of a ParameterEntry object.

This function with thrown of the validator does not exist.

Here is the caller graph for this function:

◆ getUnitTestName()

std::string Teuchos::getUnitTestName ( const std::string  groupName,
const std::string  testName 
)

Definition at line 101 of file Teuchos_UnitTestRepository.cpp.

103 {
104  std::ostringstream oss;
105  oss << groupName<<"_"<<testName<<"_UnitTest";
106  return oss.str();
107 }

◆ getYamlArray()

template<typename T >
Teuchos::Array<T> Teuchos::getYamlArray ( const YAML::Node node)

Definition at line 56 of file Teuchos_YamlParser.cpp.

57 {
59  for(YAML::const_iterator it = node.begin(); it != node.end(); it++)
60  {
61  arr.push_back(it->as<T>());
62  }
63  return arr;
64 }
void push_back(const value_type &x)
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...
Here is the call graph for this function:

◆ globalReduceSuccess()

void Teuchos::globalReduceSuccess ( bool success,
FancyOStream out 
)

Definition at line 71 of file GlobalMPISession_UnitTests.cpp.

72 {
73 #ifdef HAVE_MPI
74  int globalSumSuccessInt = -1;
75  int localSuccessInt = (success ? 0 : 1);
76  MPI_Allreduce(&localSuccessInt, &globalSumSuccessInt, 1,
77  MPI_INT, MPI_SUM, MPI_COMM_WORLD);
78  TEST_EQUALITY_CONST(globalSumSuccessInt, 0);
79 #endif
80 }
Here is the caller graph for this function:

◆ haveSameValuesUnordered()

bool Teuchos::haveSameValuesUnordered ( const Teuchos::ParameterList lhs,
const Teuchos::ParameterList rhs,
bool  verbose 
)

Definition at line 140 of file Teuchos_YamlParser.cpp.

141 {
143  Iter i = lhs.begin();
144  Iter j = rhs.begin();
145  if(lhs.name() != rhs.name())
146  {
147  if(verbose)
148  {
149  std::cout << "Parameter list names: \"" << lhs.name() << "\" and \"" << rhs.name() << "\".\n";
150  }
151  return false;
152  }
153  for(; i != lhs.end(); i++)
154  {
155  const std::string& key = lhs.name(i);
156  const Teuchos::ParameterEntry& val1 = lhs.entry(i);
157  //check that rhs also contains this key
158  if(!rhs.isParameter(key))
159  {
160  if(verbose)
161  {
162  std::cout << "One list is missing parameter: \"" << key << "\"\n";
163  }
164  return false;
165  }
166  const Teuchos::ParameterEntry& val2 = rhs.getEntry(key);
167  const Teuchos::any& any1 = val1.getAny(false);
168  const Teuchos::any& any2 = val2.getAny(false);
169  //check that types match
170  if(any1.type() != any2.type())
171  {
172  if(verbose)
173  {
174  std::cout << "Values for key \"" << key << "\" have different types.\n";
175  }
176  return false;
177  }
178  //check for parameter list special case (don't use operator==)
179  if(any1.type() == typeid(Teuchos::ParameterList))
180  {
181  if(!haveSameValuesUnordered(Teuchos::any_cast<Teuchos::ParameterList>(any1), Teuchos::any_cast<Teuchos::ParameterList>(any2), verbose))
182  {
183  //Don't need to print message here, the deepest list not matching will do that
184  return false;
185  }
186  }
187  else
188  {
189  //otherwise, use == to compare the values
190  if(!(val1 == val2))
191  {
192  if(verbose)
193  {
194  std::cout << "Values for key \"" << key << "\" are different.\n";
195  }
196  return false;
197  }
198  }
199  j++;
200  }
201  //lists must have same # of entries
202  if(j != rhs.end())
203  {
204  if(verbose)
205  {
206  std::cout << "Lists \"" << lhs.name() << "\" and \"" << rhs.name() << "\" have different number of parameters.\n";
207  }
208  return false;
209  }
210  return true;
211 }
bool haveSameValuesUnordered(const Teuchos::ParameterList &lhs, const Teuchos::ParameterList &rhs, bool verbose)
C++ Standard Library compatable filtered iterator.
A list of parameters of arbitrary type.
ParameterEntry & getEntry(const std::string &name)
Retrieves an entry with the name name.
This object is held as the "value" in the Teuchos::ParameterList std::map.
int j
Definition: lp_lib.h:1070
const std::string & name() const
The name of this ParameterList.
ConstIterator begin() const
An iterator pointing to the first entry.
Modified boost::any class, which is a container for a templated value.
Definition: Teuchos_any.hpp:86
ConstIterator end() const
An iterator pointing beyond the last entry.
const ParameterEntry & entry(ConstIterator i) const
Access to ParameterEntry (i.e., returns i->second)
const std::type_info & type() const
Return the type of value being stored.
int i
Definition: parse.c:193
pthread_key_t key
any & getAny(bool activeQry=true)
Direct access to the Teuchos::any data value underlying this object. The bool argument activeQry (def...
int verbose
Definition: lp_lib.h:1043
bool isParameter(const std::string &name) const
Whether the given parameter exists in this list.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ implicit_cast()

template<class TypeTo , class TypeFrom >
TypeTo Teuchos::implicit_cast ( const TypeFrom &  t)
inline

Perform an implicit cast of concrete types with the casted object returned by value.

This function is used as:

TypeTo myCast( const TypeFrom& a )
{
return Teuchos::implicit_cast<TypeTo>(a);
}

This function will only compile for types where an implicit conversion from objects of type TypeFrom to type TypeTo exists. Note that this is a weaker operation than a static_cast<TypeTo>(t) in that the static cast will actually compile in cases where the implicit conversion would not compile and may result in incorrect code. This function can not result in incorrect code, assuming that the implicit conversions themselves do no result in incorrect code (which is another matter all together).

This function is especially helpful when one needs to be careful of what specific type is passed in as a formal argument to a function and in comparing values. In particular, using this function is far safer than using TypeTo(t) in cases where TypeTo is a built in type since TypeTo(t) in these cases is equivalent to (TypeTo)t which is an unchecked sledge-hammer cast of the worst kind.

Definition at line 81 of file Teuchos_implicit_cast.hpp.

81 { return t; }
test_type t
Definition: main.c:6
Here is the caller graph for this function:

◆ implicit_ptr_cast()

template<class TypeTo , class TypeFrom >
TypeTo* Teuchos::implicit_ptr_cast ( TypeFrom *  t)
inline

Perform an implicit cast of pointer types with a pointer being returned.

This function is used as:

TypeTo* myPtrCast( TypeFrom *ptr1 )
{
return Teuchos::implicit_ptr_cast<TypeTo>(ptr1);
}

This function will only compile for types where an implicit conversion from pointers of type TypeFrom* to pointers of type TypeTo* exists. It is allowed for the type TypeFrom and TypeTo to actually be const types. For example, we can have TypeFrom = const std::iostream and TypeTo = const std::ostream and Teuchos::implicit_ptr_cast<const std::ostream>(&Teuchos::getConst(std::cout)) would compile just fine.

Note that this is a weaker operation than a static_cast<TypeTo*>(t) in that the static cast will actually compile in cases where the implicit conversion would not compile and may result in incorrect code. For example, a static cast up from a base class to a derived class will compile (and may be wrong) while this implicit cast function will not compile for such casts. This function can not result in incorrect code, assuming that the implicit conversions themselves do no result in incorrect code (which is another matter all together).

Definition at line 150 of file Teuchos_implicit_cast.hpp.

150 { return t; }
test_type t
Definition: main.c:6

◆ implicit_ref_cast()

template<class TypeTo , class TypeFrom >
TypeTo& Teuchos::implicit_ref_cast ( TypeFrom &  t)
inline

Perform an implicit cast of reference types with a reference being returned.

This function is used as:

TypeTo& myPtrCast( TypeFrom &ref1 )
{
return Teuchos::implicit_ref_cast<TypeTo>(ref1);
}

This function will only compile for types where an implicit conversion from references of type TypeFrom& to references of TypeTo& exists. It is allowed for the type TypeFrom and TypeTo to actually be const types. For example, we can have TypeFrom = const std::iostream and TypeTo = const std::ostream and Teuchos::implicit_ref_cast<const std::ostream>(Teuchos::getConst(std::cout)) would compile just fine.

Note that this is a weaker operation than a static_cast<TypeTo&>(t) in that the static cast will actually compile in cases where the implicit conversion would not compile and may result in incorrect code. For example, a static cast from a base to a derived class will compile (and may be wrong) while this implicit cast function will not compile for casts from base to derived classes. This function can not result in incorrect code, assuming that the implicit conversions themselves do no result in incorrect code (which is another matter all together).

Definition at line 116 of file Teuchos_implicit_cast.hpp.

116 { return t; }
test_type t
Definition: main.c:6

◆ includesVerbLevel()

bool Teuchos::includesVerbLevel ( const EVerbosityLevel  verbLevel,
const EVerbosityLevel  requestedVerbLevel,
const bool  isDefaultLevel = false 
)

Return a std::string representation of the verbosity level.

Needed for serialization KLN 23/09/2010Return true if the verbosity level includes the given level.

Parameters
verbLevel[in] The verbosity level that is in effect.
requestedVerbLevel[in] The verbosity level the client is asking if is included in verbLevel.
isDefaultLevel[in] Set to true if the level in requestedVerbLevel is the default verbosity level. In this case, if verbLevel==VERB_DEFAULT, then this function will return true. The default value is false.

Definition at line 101 of file Teuchos_VerbosityLevel.cpp.

106 {
107  return (
108  ( as<int>(verbLevel) >= as<int>(requestedVerbLevel) )
109  ||
110  ( verbLevel == VERB_DEFAULT && isDefaultLevel )
111  );
112 }
Generate output as defined by the object.
Here is the caller graph for this function:

◆ incrVerbLevel()

Teuchos::EVerbosityLevel Teuchos::incrVerbLevel ( const EVerbosityLevel  inputVerbLevel,
const int  numLevels 
)

Return an increased or decreased verbosity level.

Parameters
inputVerbLevel[in] The base verbosity level.
numLevels[in] The number of levels to increase (>0) or decrease (<0).

See the function implementation for details on what it does!

Definition at line 116 of file Teuchos_VerbosityLevel.cpp.

120 {
121  if (inputVerbLevel == VERB_DEFAULT)
122  return VERB_DEFAULT;
123  if (inputVerbLevel == VERB_EXTREME)
124  return VERB_EXTREME;
125  const int intVerbLevel = as<int>(inputVerbLevel) + numLevels;
126  if (intVerbLevel < as<int>(VERB_NONE))
127  return VERB_NONE;
128  else if (intVerbLevel > as<int>(VERB_EXTREME))
129  return VERB_EXTREME;
130  // If we get here, then intVerbLevel is a valid verbosity level.
131  return verbLevelArray[intVerbLevel];
132 }
Generate the most output possible.
Generate no output.
Generate output as defined by the object.

◆ insert() [1/3]

dependentList Teuchos::insert ( myDepList.  getEntryRCPdependent2)
Here is the caller graph for this function:

◆ insert() [2/3]

dependentList Teuchos::insert ( myDepList.  getEntryRCPdependent3)

◆ insert() [3/3]

dependentList Teuchos::insert ( myDepList.  getEntryRCPdependent1)

◆ ireceive() [1/2]

template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view<ViewType>::value),RCP<CommRequest<Ordinal> > >::type Teuchos::ireceive ( const ViewType &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< Ordinal > &  comm 
)

Variant of ireceive that takes a tag argument (and restores the correct order of arguments).

Definition at line 113 of file Kokkos_TeuchosCommAdapters.hpp.

117 {
119  return ireceive(persistingView(recvBuffer), sourceRank, tag, comm);
120 }
RCP< CommRequest< Ordinal > > ireceive(const Comm< Ordinal > &comm, const ArrayRCP< Packet > &recvBuffer, const int sourceRank)
Receive one or more objects (that use values semantics) from another process.
Definition: xmlparse.c:181
Teuchos::ArrayRCP< typename ViewType::value_type > persistingView(const ViewType &view)
Here is the call graph for this function:

◆ ireceive() [2/2]

template<typename Ordinal , typename Packet >
RCP<CommRequest<Ordinal> > Teuchos::ireceive ( const ArrayRCP< Packet > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< Ordinal > &  comm 
)

Variant of ireceive that takes a tag argument (and restores the correct order of arguments).

Here is the caller graph for this function:

◆ ireceive< int, double >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, double > ( const Comm< int > &  comm,
const ArrayRCP< double > &  recvBuffer,
const int  sourceRank 
)

Definition at line 976 of file Teuchos_CommHelpers.cpp.

979 {
980  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, double>");
981  return ireceiveImpl<double> (comm, recvBuffer, sourceRank);
982 }
Here is the caller graph for this function:

◆ ireceive< int, double >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, double > ( const ArrayRCP< double > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 986 of file Teuchos_CommHelpers.cpp.

990 {
991  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, double>");
992  return ireceiveImpl<double> (recvBuffer, sourceRank, tag, comm);
993 }
Definition: xmlparse.c:181

◆ ireceive< int, double >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, double > ( const Comm< int > &  comm,
const ArrayRCP< double > &  recvBuffer,
const int  sourceRank 
)

Definition at line 976 of file Teuchos_CommHelpers.cpp.

979 {
980  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, double>");
981  return ireceiveImpl<double> (comm, recvBuffer, sourceRank);
982 }
Here is the caller graph for this function:

◆ ireceive< int, double >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, double > ( const ArrayRCP< double > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 986 of file Teuchos_CommHelpers.cpp.

990 {
991  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, double>");
992  return ireceiveImpl<double> (recvBuffer, sourceRank, tag, comm);
993 }
Definition: xmlparse.c:181

◆ ireceive< int, float >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, float > ( const Comm< int > &  comm,
const ArrayRCP< float > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1044 of file Teuchos_CommHelpers.cpp.

1047 {
1048  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, float>");
1049  return ireceiveImpl<float> (comm, recvBuffer, sourceRank);
1050 }
Here is the caller graph for this function:

◆ ireceive< int, float >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, float > ( const ArrayRCP< float > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1054 of file Teuchos_CommHelpers.cpp.

1058 {
1059  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, float>");
1060  return ireceiveImpl<float> (recvBuffer, sourceRank, tag, comm);
1061 }
Definition: xmlparse.c:181

◆ ireceive< int, float >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, float > ( const Comm< int > &  comm,
const ArrayRCP< float > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1044 of file Teuchos_CommHelpers.cpp.

1047 {
1048  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, float>");
1049  return ireceiveImpl<float> (comm, recvBuffer, sourceRank);
1050 }
Here is the caller graph for this function:

◆ ireceive< int, float >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, float > ( const ArrayRCP< float > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1054 of file Teuchos_CommHelpers.cpp.

1058 {
1059  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, float>");
1060  return ireceiveImpl<float> (recvBuffer, sourceRank, tag, comm);
1061 }
Definition: xmlparse.c:181

◆ ireceive< int, int >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, int > ( const Comm< int > &  comm,
const ArrayRCP< int > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1542 of file Teuchos_CommHelpers.cpp.

1545 {
1546  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, int>");
1547  return ireceiveImpl<int> (comm, recvBuffer, sourceRank);
1548 }
Here is the caller graph for this function:

◆ ireceive< int, int >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, int > ( const ArrayRCP< int > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1552 of file Teuchos_CommHelpers.cpp.

1556 {
1557  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, int>");
1558  return ireceiveImpl<int> (recvBuffer, sourceRank, tag, comm);
1559 }
Definition: xmlparse.c:181

◆ ireceive< int, int >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, int > ( const Comm< int > &  comm,
const ArrayRCP< int > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1542 of file Teuchos_CommHelpers.cpp.

1545 {
1546  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, int>");
1547  return ireceiveImpl<int> (comm, recvBuffer, sourceRank);
1548 }
Here is the caller graph for this function:

◆ ireceive< int, int >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, int > ( const ArrayRCP< int > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1552 of file Teuchos_CommHelpers.cpp.

1556 {
1557  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, int>");
1558  return ireceiveImpl<int> (recvBuffer, sourceRank, tag, comm);
1559 }
Definition: xmlparse.c:181

◆ ireceive< int, long >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, long > ( const Comm< int > &  comm,
const ArrayRCP< long > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1328 of file Teuchos_CommHelpers.cpp.

1331 {
1332  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, long>");
1333  return ireceiveImpl<long> (comm, recvBuffer, sourceRank);
1334 }
Here is the caller graph for this function:

◆ ireceive< int, long >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, long > ( const ArrayRCP< long > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1338 of file Teuchos_CommHelpers.cpp.

1342 {
1343  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, long>");
1344  return ireceiveImpl<long> (recvBuffer, sourceRank, tag, comm);
1345 }
Definition: xmlparse.c:181

◆ ireceive< int, long >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, long > ( const Comm< int > &  comm,
const ArrayRCP< long > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1328 of file Teuchos_CommHelpers.cpp.

1331 {
1332  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, long>");
1333  return ireceiveImpl<long> (comm, recvBuffer, sourceRank);
1334 }
Here is the caller graph for this function:

◆ ireceive< int, long >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, long > ( const ArrayRCP< long > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1338 of file Teuchos_CommHelpers.cpp.

1342 {
1343  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, long>");
1344  return ireceiveImpl<long> (recvBuffer, sourceRank, tag, comm);
1345 }
Definition: xmlparse.c:181

◆ ireceive< int, long long >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, long long > ( const ArrayRCP< long long > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1149 of file Teuchos_CommHelpers.cpp.

1153 {
1154  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, long long>");
1155  return ireceiveImpl<long long> (recvBuffer, sourceRank, tag, comm);
1156 }
Definition: xmlparse.c:181

◆ ireceive< int, long long >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, long long > ( const Comm< int > &  comm,
const ArrayRCP< long long > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1139 of file Teuchos_CommHelpers.cpp.

1142 {
1143  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, long long>");
1144  return ireceiveImpl<long long> (comm, recvBuffer, sourceRank);
1145 }
Here is the caller graph for this function:

◆ ireceive< int, long long >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, long long > ( const Comm< int > &  comm,
const ArrayRCP< long long > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1139 of file Teuchos_CommHelpers.cpp.

1142 {
1143  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, long long>");
1144  return ireceiveImpl<long long> (comm, recvBuffer, sourceRank);
1145 }
Here is the caller graph for this function:

◆ ireceive< int, long long >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, long long > ( const ArrayRCP< long long > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1149 of file Teuchos_CommHelpers.cpp.

1153 {
1154  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, long long>");
1155  return ireceiveImpl<long long> (recvBuffer, sourceRank, tag, comm);
1156 }
Definition: xmlparse.c:181

◆ ireceive< int, short >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, short > ( const ArrayRCP< short > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1739 of file Teuchos_CommHelpers.cpp.

1743 {
1744  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, short>");
1745  return ireceiveImpl<short> (recvBuffer, sourceRank, tag, comm);
1746 }
Definition: xmlparse.c:181

◆ ireceive< int, short >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, short > ( const Comm< int > &  comm,
const ArrayRCP< short > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1729 of file Teuchos_CommHelpers.cpp.

1732 {
1733  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, short>");
1734  return ireceiveImpl<short> (comm, recvBuffer, sourceRank);
1735 }
Here is the caller graph for this function:

◆ ireceive< int, short >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, short > ( const Comm< int > &  comm,
const ArrayRCP< short > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1729 of file Teuchos_CommHelpers.cpp.

1732 {
1733  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, short>");
1734  return ireceiveImpl<short> (comm, recvBuffer, sourceRank);
1735 }
Here is the caller graph for this function:

◆ ireceive< int, short >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, short > ( const ArrayRCP< short > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1739 of file Teuchos_CommHelpers.cpp.

1743 {
1744  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, short>");
1745  return ireceiveImpl<short> (recvBuffer, sourceRank, tag, comm);
1746 }
Definition: xmlparse.c:181

◆ ireceive< int, std::complex< double > >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, std::complex< double > > ( const Comm< int > &  comm,
const ArrayRCP< std::complex< double > > &  recvBuffer,
const int  sourceRank 
)

Definition at line 837 of file Teuchos_CommHelpers.cpp.

840 {
841  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, std::complex<double> >");
842  return ireceiveImpl<std::complex<double> > (comm, recvBuffer, sourceRank);
843 }

◆ ireceive< int, std::complex< double > >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, std::complex< double > > ( const ArrayRCP< std::complex< double > > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 847 of file Teuchos_CommHelpers.cpp.

851 {
852  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, std::complex<double> >");
853  return ireceiveImpl<std::complex<double> > (recvBuffer, sourceRank, tag, comm);
854 }
Definition: xmlparse.c:181

◆ ireceive< int, std::complex< double > >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, std::complex< double > > ( const Comm< int > &  comm,
const ArrayRCP< std::complex< double > > &  recvBuffer,
const int  sourceRank 
)

Definition at line 837 of file Teuchos_CommHelpers.cpp.

840 {
841  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, std::complex<double> >");
842  return ireceiveImpl<std::complex<double> > (comm, recvBuffer, sourceRank);
843 }

◆ ireceive< int, std::complex< double > >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, std::complex< double > > ( const ArrayRCP< std::complex< double > > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 847 of file Teuchos_CommHelpers.cpp.

851 {
852  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, std::complex<double> >");
853  return ireceiveImpl<std::complex<double> > (recvBuffer, sourceRank, tag, comm);
854 }
Definition: xmlparse.c:181

◆ ireceive< int, std::complex< float > >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, std::complex< float > > ( const ArrayRCP< std::complex< float > > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 915 of file Teuchos_CommHelpers.cpp.

919 {
920  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, std::complex<float> >");
921  return ireceiveImpl<std::complex<float> > (recvBuffer, sourceRank, tag, comm);
922 }
Definition: xmlparse.c:181

◆ ireceive< int, std::complex< float > >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, std::complex< float > > ( const Comm< int > &  comm,
const ArrayRCP< std::complex< float > > &  recvBuffer,
const int  sourceRank 
)

Definition at line 905 of file Teuchos_CommHelpers.cpp.

908 {
909  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, std::complex<float> >");
910  return ireceiveImpl<std::complex<float> > (comm, recvBuffer, sourceRank);
911 }

◆ ireceive< int, std::complex< float > >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, std::complex< float > > ( const Comm< int > &  comm,
const ArrayRCP< std::complex< float > > &  recvBuffer,
const int  sourceRank 
)

Definition at line 905 of file Teuchos_CommHelpers.cpp.

908 {
909  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, std::complex<float> >");
910  return ireceiveImpl<std::complex<float> > (comm, recvBuffer, sourceRank);
911 }

◆ ireceive< int, std::complex< float > >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, std::complex< float > > ( const ArrayRCP< std::complex< float > > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 915 of file Teuchos_CommHelpers.cpp.

919 {
920  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, std::complex<float> >");
921  return ireceiveImpl<std::complex<float> > (recvBuffer, sourceRank, tag, comm);
922 }
Definition: xmlparse.c:181

◆ ireceive< int, unsigned int >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, unsigned int > ( const Comm< int > &  comm,
const ArrayRCP< unsigned int > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1635 of file Teuchos_CommHelpers.cpp.

1638 {
1639  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned int>");
1640  return ireceiveImpl<unsigned int> (comm, recvBuffer, sourceRank);
1641 }
Here is the caller graph for this function:

◆ ireceive< int, unsigned int >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, unsigned int > ( const ArrayRCP< unsigned int > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1645 of file Teuchos_CommHelpers.cpp.

1649 {
1650  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned int>");
1651  return ireceiveImpl<unsigned int> (recvBuffer, sourceRank, tag, comm);
1652 }
Definition: xmlparse.c:181

◆ ireceive< int, unsigned int >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, unsigned int > ( const Comm< int > &  comm,
const ArrayRCP< unsigned int > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1635 of file Teuchos_CommHelpers.cpp.

1638 {
1639  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned int>");
1640  return ireceiveImpl<unsigned int> (comm, recvBuffer, sourceRank);
1641 }
Here is the caller graph for this function:

◆ ireceive< int, unsigned int >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, unsigned int > ( const ArrayRCP< unsigned int > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1645 of file Teuchos_CommHelpers.cpp.

1649 {
1650  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned int>");
1651  return ireceiveImpl<unsigned int> (recvBuffer, sourceRank, tag, comm);
1652 }
Definition: xmlparse.c:181

◆ ireceive< int, unsigned long >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, unsigned long > ( const Comm< int > &  comm,
const ArrayRCP< unsigned long > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1422 of file Teuchos_CommHelpers.cpp.

1425 {
1426  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned long>");
1427  return ireceiveImpl<unsigned long> (comm, recvBuffer, sourceRank);
1428 }
Here is the caller graph for this function:

◆ ireceive< int, unsigned long >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, unsigned long > ( const ArrayRCP< unsigned long > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1432 of file Teuchos_CommHelpers.cpp.

1436 {
1437  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned long>");
1438  return ireceiveImpl<unsigned long> (recvBuffer, sourceRank, tag, comm);
1439 }
Definition: xmlparse.c:181

◆ ireceive< int, unsigned long >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, unsigned long > ( const Comm< int > &  comm,
const ArrayRCP< unsigned long > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1422 of file Teuchos_CommHelpers.cpp.

1425 {
1426  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned long>");
1427  return ireceiveImpl<unsigned long> (comm, recvBuffer, sourceRank);
1428 }
Here is the caller graph for this function:

◆ ireceive< int, unsigned long >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, unsigned long > ( const ArrayRCP< unsigned long > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1432 of file Teuchos_CommHelpers.cpp.

1436 {
1437  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned long>");
1438  return ireceiveImpl<unsigned long> (recvBuffer, sourceRank, tag, comm);
1439 }
Definition: xmlparse.c:181

◆ ireceive< int, unsigned long long >() [1/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, unsigned long long > ( const Comm< int > &  comm,
const ArrayRCP< unsigned long long > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1232 of file Teuchos_CommHelpers.cpp.

1235 {
1236  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned long long>");
1237  return ireceiveImpl<unsigned long long> (comm, recvBuffer, sourceRank);
1238 }
Here is the caller graph for this function:

◆ ireceive< int, unsigned long long >() [2/4]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::ireceive< int, unsigned long long > ( const ArrayRCP< unsigned long long > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1242 of file Teuchos_CommHelpers.cpp.

1246 {
1247  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned long long>");
1248  return ireceiveImpl<unsigned long long> (recvBuffer, sourceRank, tag, comm);
1249 }
Definition: xmlparse.c:181

◆ ireceive< int, unsigned long long >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, unsigned long long > ( const Comm< int > &  comm,
const ArrayRCP< unsigned long long > &  recvBuffer,
const int  sourceRank 
)

Definition at line 1232 of file Teuchos_CommHelpers.cpp.

1235 {
1236  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned long long>");
1237  return ireceiveImpl<unsigned long long> (comm, recvBuffer, sourceRank);
1238 }
Here is the caller graph for this function:

◆ ireceive< int, unsigned long long >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::ireceive< int, unsigned long long > ( const ArrayRCP< unsigned long long > &  recvBuffer,
const int  sourceRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1242 of file Teuchos_CommHelpers.cpp.

1246 {
1247  TEUCHOS_COMM_TIME_MONITOR("ireceive<int, unsigned long long>");
1248  return ireceiveImpl<unsigned long long> (recvBuffer, sourceRank, tag, comm);
1249 }
Definition: xmlparse.c:181

◆ isend() [1/13]

template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view<ViewType>::value),RCP<CommRequest<Ordinal> > >::type Teuchos::isend ( const ViewType &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< Ordinal > &  comm 
)

Variant of isend() that takes a tag (and restores the correct order of arguments).

Definition at line 101 of file Kokkos_TeuchosCommAdapters.hpp.

105 {
107  return isend(persistingView(sendBuffer), destRank, tag, comm);
108 }
RCP< CommRequest< Ordinal > > isend(const Comm< Ordinal > &comm, const ArrayRCP< const Packet > &sendBuffer, const int destRank)
Send objects that use values semantics to another process.
Definition: xmlparse.c:181
Teuchos::ArrayRCP< typename ViewType::value_type > persistingView(const ViewType &view)
Here is the call graph for this function:

◆ isend() [2/13]

template<typename Ordinal , typename Packet >
RCP<CommRequest<Ordinal> > Teuchos::isend ( const ArrayRCP< const Packet > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< Ordinal > &  comm 
)

Variant of isend() that takes a tag (and restores the correct order of arguments).

◆ isend() [3/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const std::complex< double > > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 879 of file Teuchos_CommHelpers.cpp.

883 {
884  return isendImpl<std::complex<double> > (sendBuffer, destRank, tag, comm);
885 }
Definition: xmlparse.c:181
Here is the caller graph for this function:

◆ isend() [4/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const std::complex< float > > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 947 of file Teuchos_CommHelpers.cpp.

951 {
952  return isendImpl<std::complex<float> > (sendBuffer, destRank, tag, comm);
953 }
Definition: xmlparse.c:181

◆ isend() [5/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const double > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1018 of file Teuchos_CommHelpers.cpp.

1022 {
1023  return isendImpl<double> (sendBuffer, destRank, tag, comm);
1024 }
Definition: xmlparse.c:181

◆ isend() [6/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const float > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1086 of file Teuchos_CommHelpers.cpp.

1090 {
1091  return isendImpl<float> (sendBuffer, destRank, tag, comm);
1092 }
Definition: xmlparse.c:181

◆ isend() [7/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const long long > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1181 of file Teuchos_CommHelpers.cpp.

1185 {
1186  return isendImpl<long long> (sendBuffer, destRank, tag, comm);
1187 }
Definition: xmlparse.c:181

◆ isend() [8/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const unsigned long long > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1274 of file Teuchos_CommHelpers.cpp.

1278 {
1279  return isendImpl<unsigned long long> (sendBuffer, destRank, tag, comm);
1280 }
Definition: xmlparse.c:181

◆ isend() [9/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const long > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1370 of file Teuchos_CommHelpers.cpp.

1374 {
1375  return isendImpl<long> (sendBuffer, destRank, tag, comm);
1376 }
Definition: xmlparse.c:181

◆ isend() [10/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const unsigned long > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1464 of file Teuchos_CommHelpers.cpp.

1468 {
1469  return isendImpl<unsigned long> (sendBuffer, destRank, tag, comm);
1470 }
Definition: xmlparse.c:181

◆ isend() [11/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const int > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1584 of file Teuchos_CommHelpers.cpp.

1588 {
1589  return isendImpl<int> (sendBuffer, destRank, tag, comm);
1590 }
Definition: xmlparse.c:181

◆ isend() [12/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const unsigned int > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1677 of file Teuchos_CommHelpers.cpp.

1681 {
1682  return isendImpl<unsigned int> (sendBuffer, destRank, tag, comm);
1683 }
Definition: xmlparse.c:181

◆ isend() [13/13]

template<>
RCP<Teuchos::CommRequest<int> > Teuchos::isend ( const ArrayRCP< const short > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1771 of file Teuchos_CommHelpers.cpp.

1775 {
1776  return isendImpl<short> (sendBuffer, destRank, tag, comm);
1777 }
Definition: xmlparse.c:181

◆ isend< int, double >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, double > ( const ArrayRCP< const double > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)
Here is the caller graph for this function:

◆ isend< int, float >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, float > ( const ArrayRCP< const float > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)
Here is the caller graph for this function:

◆ isend< int, int >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, int > ( const ArrayRCP< const int > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)
Here is the caller graph for this function:

◆ isend< int, long >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, long > ( const ArrayRCP< const long > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)
Here is the caller graph for this function:

◆ isend< int, long long >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, long long > ( const ArrayRCP< const long long > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)
Here is the caller graph for this function:

◆ isend< int, short >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, short > ( const ArrayRCP< const short > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)
Here is the caller graph for this function:

◆ isend< int, std::complex< double > >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, std::complex< double > > ( const ArrayRCP< const std::complex< double > > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

◆ isend< int, std::complex< float > >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, std::complex< float > > ( const ArrayRCP< const std::complex< float > > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

◆ isend< int, unsigned int >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, unsigned int > ( const ArrayRCP< const unsigned int > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)
Here is the caller graph for this function:

◆ isend< int, unsigned long >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, unsigned long > ( const ArrayRCP< const unsigned long > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)
Here is the caller graph for this function:

◆ isend< int, unsigned long long >()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT RCP<CommRequest<int> > Teuchos::isend< int, unsigned long long > ( const ArrayRCP< const unsigned long long > &  sendBuffer,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)
Here is the caller graph for this function:

◆ mergeCounterNames()

void Teuchos::mergeCounterNames ( const Comm< int > &  comm,
const Array< std::string > &  localNames,
Array< std::string > &  globalNames,
const ECounterSetOp  setOp 
)

Merge counter names over all processors.

Different MPI processes may have created different sets of counters. Use this function to reconcile the sets among processes, either by computing their intersection or their union. This is done using a reduction to MPI Rank 0 (relative to the given communicator) and a broadcast to all processes participating in the communicator. We use a reduce-and-broadcast rather than just a reduction, so that all participating processes can use the resulting list of global names as lookup keys for computing global statistics.

Parameters
comm[in] Communicator over which to merge.
localNames[in] The calling MPI process' list of (local) counter names.
globalNames[out] On output, on each MPI process: the results of merging the counter names.
setOp[in] If Intersection, globalNames on output contains the intersection of all sets of counter names. If Union, globalNames on output contains the union of all sets of counter names.

Definition at line 466 of file Teuchos_PerformanceMonitorBase.cpp.

470  {
471  const int myRank = comm.getRank();
472  const int left = 0;
473  const int right = comm.getSize() - 1;
474  Array<std::string> theGlobalNames;
475  mergeCounterNamesHelper (comm, myRank, left, right,
476  localNames, theGlobalNames, setOp);
477 
478  // Proc 0 has the list of counter names. Now broadcast it back to
479  // all the procs.
480  broadcastStrings (comm, theGlobalNames);
481 
482  // "Transactional" semantics ensure strong exception safety for
483  // output.
484  globalNames.swap (theGlobalNames);
485  }
int myRank
friend void swap(Array< T2 > &a1, Array< T2 > &a2)
virtual int getRank() const =0
Returns the rank of this process.
virtual int getSize() const =0
Returns the number of processes that make up this communicator.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mpiCommRequest()

template<class OrdinalType >
RCP<MpiCommRequest<OrdinalType> > Teuchos::mpiCommRequest ( MPI_Request  rawMpiRequest,
const ArrayView< char >::size_type  numBytes 
)
inline

Definition at line 355 of file Teuchos_DefaultMpiComm.hpp.

357 {
358  return rcp (new MpiCommRequest<OrdinalType> (rawMpiRequest, numBytes));
359 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
Here is the call graph for this function:

◆ mpiCommStatus()

template<class OrdinalType >
RCP<MpiCommStatus<OrdinalType> > Teuchos::mpiCommStatus ( MPI_Status  rawMpiStatus)
inline

Definition at line 166 of file Teuchos_DefaultMpiComm.hpp.

167 {
168  return rcp (new MpiCommStatus<OrdinalType> (rawMpiStatus));
169 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
Here is the call graph for this function:

◆ mpiErrorCodeToString()

std::string Teuchos::mpiErrorCodeToString ( const int  errCode)

Human-readable string version of the given MPI error code.

Definition at line 50 of file Teuchos_DefaultMpiComm.cpp.

51  {
52  if (errCode == MPI_SUCCESS) {
53  return "MPI_SUCCESS";
54  }
55  else {
56  char rawErrString[MPI_MAX_ERROR_STRING];
57  int len = 0;
58  int err = MPI_Error_string (errCode, rawErrString, &len);
59  if (err != MPI_SUCCESS) {
60  // Assume that the string wasn't written. This means it might
61  // not be null terminated, so make it a valid empty string by
62  // writing the null termination character to it.
63  if (MPI_MAX_ERROR_STRING > 0) {
64  rawErrString[0] = '\0';
65  }
66  }
67  return std::string (rawErrString);
68  }
69  }
const char int len
Definition: expat.h:778
Here is the caller graph for this function:

◆ myDepList()

ParameterList Teuchos::myDepList ( "String Vali Dep List"  )

◆ NUMBER_PARAM_TYPE_TEST() [1/2]

Teuchos::NUMBER_PARAM_TYPE_TEST ( int  )

◆ NUMBER_PARAM_TYPE_TEST() [2/2]

Teuchos::NUMBER_PARAM_TYPE_TEST ( llint  )

◆ NUMBER_VIS_TEST()

Teuchos::NUMBER_VIS_TEST ( int  )
Here is the caller graph for this function:

◆ objectBuilder() [1/2]

template<class ObjectType >
RCP<ObjectBuilder<ObjectType> > Teuchos::objectBuilder ( )

Definition at line 184 of file Teuchos_ObjectBuilder.hpp.

185 {
186  RCP<ObjectBuilder<ObjectType> > ob = rcp(new ObjectBuilder<ObjectType>() );
187  return ob;
188 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
Here is the call graph for this function:

◆ objectBuilder() [2/2]

template<class ObjectType >
RCP<ObjectBuilder<ObjectType> > Teuchos::objectBuilder ( const std::string &  objectName,
const std::string &  objectTypeName 
)

Definition at line 193 of file Teuchos_ObjectBuilder.hpp.

194 {
195  RCP<ObjectBuilder<ObjectType> > ob = rcp(new ObjectBuilder<ObjectType>() );
196  ob->setObjectName(objectName);
197  ob->setObjectTypeName(objectTypeName);
198  return ob;
199 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
Here is the call graph for this function:

◆ operator &&() [1/2]

bool Teuchos::operator&& ( const dd_real &  a,
const dd_real &  b 
)
Here is the caller graph for this function:

◆ operator &&() [2/2]

bool Teuchos::operator&& ( const qd_real &  a,
const qd_real &  b 
)
Here is the caller graph for this function:

◆ operator<()

bool Teuchos::operator< ( const UnitTestData a,
const UnitTestData b 
)

Definition at line 88 of file Teuchos_UnitTestRepository.cpp.

89 {
90  if (a.groupName < b.groupName) {
91  return true;
92  }
93  else if (a.groupName > b.groupName) {
94  return false;
95  }
96  return a.insertionIndex < b.insertionIndex;
97 }
void char ipfint ipfint ipfint const double const double ipfint const double * b
Definition: IpBlas.cpp:44
struct a_s a
Definition: IpBlas.cpp:40

◆ operator<<() [1/4]

std::ostream& Teuchos::operator<< ( std::ostream &  os,
const Teuchos::Object obj 
)
related

Definition at line 131 of file Teuchos_Object.cpp.

132 {
133  os << obj.label () << std::endl;
134  obj.print (os);
135  return os;
136 }
virtual void print(std::ostream &os) const
Print the object to the given output stream.
virtual const char * label() const
Access the object&#39;s label (LEGACY; return std::string instead).
Here is the call graph for this function:

◆ operator<<() [2/4]

template<class Key >
std::ostream& Teuchos::operator<< ( std::ostream &  os,
const HashSet< Key > &  h 
)
related

Definition at line 268 of file Teuchos_HashSet.hpp.

269  {
270  return os << h.toString();
271  }
Here is the caller graph for this function:

◆ operator<<() [3/4]

template<class Key , class Value >
std::ostream& Teuchos::operator<< ( std::ostream &  os,
const Hashtable< Key, Value > &  h 
)
related

Definition at line 341 of file Teuchos_Hashtable.hpp.

342  {
343  return os << toString(h);
344  }
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:

◆ operator<<() [4/4]

template<class T >
std::ostream& Teuchos::operator<< ( std::ostream &  os,
const TwoDArray< T > &  array 
)
inline

Definition at line 365 of file Teuchos_TwoDArray.hpp.

365  {
366  return os << TwoDArray<T>::toString(array);
367 }

◆ operator==()

template<typename T >
bool Teuchos::operator== ( const TwoDArray< T > &  a1,
const TwoDArray< T > &  a2 
)

Definition at line 418 of file Teuchos_TwoDArray.hpp.

418  {
419  if(a1.isSymmetrical() != a2.isSymmetrical()){
420  return false;
421  }
422  if(a1.isSymmetrical()){
423  return TwoDDetails::symmetricCompare(a1,a2);
424  }
425  else{
426  return a1.getDataArray() == a2.getDataArray() &&
427  a1.getNumRows() == a2.getNumRows() &&
428  a1.getNumCols() == a2.getNumCols();
429  }
430 }
bool symmetricCompare(const TwoDArray< T > &a1, const TwoDArray< T > &a2)
A function for comparing symmetrical arrarys.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator>>()

template<class T >
std::istringstream& Teuchos::operator>> ( std::istringstream &  in,
TwoDArray< T > &  array 
)

Definition at line 356 of file Teuchos_TwoDArray.hpp.

356  {
357  array = TwoDArray<T>::fromString(in.str());
358  return in;
359 }
local unsigned in(void *in_desc, unsigned char **buf)
Definition: gun.c:88
Here is the call graph for this function:

◆ passfail()

const std::string Teuchos::passfail ( const bool  result)
inline

Return "passed" or "failed".

Definition at line 559 of file Teuchos_TestingHelpers.hpp.

560 {
561  if (!result)
562  return "FAILED";
563  return "passed";
564 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ passfail_with_location()

const std::string Teuchos::passfail_with_location ( const bool  result,
const std::string &  file,
const int  lineNumber 
)

Helper function for TEUCHOS_PASS_FAIL(...).

Definition at line 61 of file Teuchos_TestingHelpers.cpp.

63 {
64  std::string rtn = passfail(result);
65  if (!result && showTestFailureLocation()) {
66  rtn += " ==> "+file+":"+toString(lineNumber);
67  }
68  return rtn;
69 }
std::string toString(const any &rhs)
Converts the value in any to a std::string.
const std::string passfail(const bool result)
Return "passed" or "failed".
void showTestFailureLocation(bool)
Set if TEUCHOS_PASS_FAIL(...) should print test failure location.
Definition: gzappend.c:168
Here is the call graph for this function:

◆ PerfTest_CheckOrAdd_Test()

PerfTestResult Teuchos::PerfTest_CheckOrAdd_Test ( XMLTestNode  machine_config,
XMLTestNode  new_test,
const std::string  filename,
const std::string  ext_hostname = std::string() 
)

Check whether a test is present and match an existing test in an archive.

This function consumes a machine configuration XMLTestNode and a test entry XMLTestNode. It will attempt to read from an existing file containing a test archive, or generate a new one. Optionally a hostname override can be provided, which is for example useful when running on clusters, where the cluster name should be used for the test entries instead of the compute node name. PerfTest_CheckOrAdd_Test will go through the test archive and search for a matching machine name with matching machine configuration and matching test configuration. If one is found the result values will be compared, if not a new test entry is generated and the result written back to the file.

Parameters
machine_config[in] An XMLTestNode describing the machine configuration.
new_test[in] An XMLTestNode describing the test.
filename[in] The name of a file containing a performance test archive.
ext_hostname[in] An optional hostname to be used instead of the one provided by the OS.
Returns
Whether a matching test is found, or if it was added to an archive.

Here is the list of valid return values:

  • PerfTestFailed: Matching configuration found, but results are deviating more than the allowed tolerance.
  • PerfTestPassed: Matching configuration found, and results are within tolerances.
  • PerfTestNewMachine: The test archive didn't contain an entry with the same machine name. A new entry was generated.
  • PerfTestNewConfiguration: No matching machine configuration was found. A new entry was generated.
  • PerfTestNewTest: No matching testname was found. A new entry was generated.
  • PerfTestNewTestConfiguration: A matching testname was found, but different parameters were used. A new entry was generated.
  • PerfTestUpdatedTest: A matching test was found but more result values were given then previously found. The entry is updated. This will only happen if all the old result values are present in the new ones, and are within their respective tolerances.

Definition at line 239 of file Teuchos_XMLPerfTestArchive.cpp.

243 {
244  XMLTestNode database;
245  PerfTestResult return_value = PerfTestPassed;
246  bool is_new_config = true;
247 
248  // Open Database File
249  //
250  // FIXME (mfh 09 Apr 2014) This actually opens the file twice.
251  if (std::ifstream (filename.c_str ())) {
252  database = FileInputSource (filename).getObject ();
253  }
254 
255  // Get Current Hostname
256  char hostname[256];
257  memset (hostname, 0, 256);
258  if (ext_hostname.empty ()) {
259  throw std::runtime_error("Function *gethostname* not supported on Windows.");
260  } else {
261  strncat (hostname, ext_hostname.c_str (), 255);
262  }
263 
264  XMLTestNode new_test_entry = new_test.getChild ("TestEntry");
265 
266  if (database.isEmpty ()) {
267  database = XMLTestNode ("PerfTests");
268  }
269  // Does hostname exist?
270  if (database.hasChild (hostname)) {
271  XMLTestNode machine = database.getChild (hostname);
272 
273  // Find matching machine configuration
274  for (int i = 0; i < machine.numChildren (); ++i) {
275  XMLTestNode configuration = machine.getChild (i);
276  TEUCHOS_TEST_FOR_EXCEPTION(
277  configuration.getTag ().compare ("Configuration") != 0,
278  std::runtime_error, "Unexpected Tag \"" << configuration.getTag ()
279  << "\"; only children with Tag = \"Configuration\" are allowed in a "
280  "MachineEntry.");
281 
282  TEUCHOS_TEST_FOR_EXCEPTION(
283  ! configuration.hasChild ("MachineConfiguration") ||
284  ! configuration.hasChild ("Tests"),
285  std::runtime_error,
286  "A Configuration needs to have a child \"MachineConfiguration\" and a "
287  "child \"Tests\".");
288 
289  XMLTestNode machine_configuration = configuration.getChild ("MachineConfiguration");
290  XMLTestNode old_tests = configuration.getChild ("Tests");
291 
292  if (machine_configuration.hasSameElements (machine_config)) {
293  is_new_config = false;
294 
295  // Find existing test with same tag as the new test
296  if (old_tests.hasChild (new_test.getTag ())) {
297 
298  XMLTestNode old_test = old_tests.getChild (new_test.getTag ());
299 
300  int new_test_config = -1;
301  for (int k = 0; k < old_test.numChildren (); ++k) {
302  XMLTestNode old_test_entry = old_test.getChild (k);
303 
304  TEUCHOS_TEST_FOR_EXCEPTION(
305  ! old_test_entry.hasChild ("TestConfiguration") ||
306  ! new_test_entry.hasChild ("TestResults"),
307  std::runtime_error, "A TestEntry needs to have a child "
308  "\"TestConfiguration\" and a child \"TestResults\".");
309 
310  if (old_test_entry.getChild ("TestConfiguration").hasSameElements (new_test_entry.getChild ("TestConfiguration"))) {
311  new_test_config = k;
312  }
313  }
314 
315  if (new_test_config < 0) {
316  old_test.addChild (new_test_entry);
317  return_value = PerfTestNewTestConfiguration;
318  } else {
319  bool deviation = false;
320  XMLTestNode old_test_entry = old_test.getChild (new_test_config);
321  XMLTestNode old_results = old_test_entry.getChild ("TestResults");
322  XMLTestNode new_results = new_test_entry.getChild ("TestResults");
323 
324  // Compare all entries
325  for (int old_r = 0; old_r < old_results.numChildren (); ++old_r) {
326  XMLTestNode result_entry = old_results.getChild (old_r);
327 
328  // Finding entry with same name
329  bool exists = new_results.hasChild (result_entry.getTag ());
330 
331  if (exists) {
332  std::string oldv_str = result_entry.getContentLine (0);
333 
334  // If it is a time or result compare numeric values with tolerance
335  if((result_entry.getTag().find("Time")==0) || (result_entry.getTag().find("Result")==0)) {
336  ValueTolerance old_valtol(oldv_str);
337  ValueTolerance new_valtol(new_results.getChild(result_entry.getTag()).getContentLine(0));
338 
339  if(old_valtol.use_tolerance) {
340  double diff = old_valtol.value - new_valtol.value;
341  diff*=diff;
342 
343  double normalization = old_valtol.value;
344  normalization*=normalization;
345 
346  if(normalization==0?diff>0:diff/normalization>old_valtol.tolerance*old_valtol.tolerance) {
347  deviation = true;
348  std::cout << std::endl
349  << "DeviationA in Test: \"" << old_test.getTag()
350  << "\" for entry \"" << result_entry.getTag() << "\"" << std::endl;
351  std::cout << " Existing Value: \"" << oldv_str << "\"" << std::endl;
352  std::cout << " New Value: \"" << new_results.getChild(result_entry.getTag()).getContentLine(0) << "\"" << std::endl << std::endl;
353  }
354  } else {
355  if( (old_valtol.lower>new_valtol.value) || (old_valtol.upper<new_valtol.value)) {
356  deviation = true;
357  std::cout << std::endl
358  << "DeviationB in Test: \"" << old_test.getTag()
359  << "\" for entry \"" << result_entry.getTag() << "\"" << std::endl;
360  std::cout << " Existing Value: \"" << oldv_str << "\"" << std::endl;
361  std::cout << " New Value: \"" << new_results.getChild(result_entry.getTag()).getContentLine(0) << "\"" << std::endl << std::endl;
362  }
363  }
364  } else {
365  // Compare exact match for every other type of entry
366  if(oldv_str.compare(new_results.getChild(result_entry.getTag()).getContentLine(0))!=0) {
367  deviation = true;
368  std::cout << std::endl
369  << "DeviationC in Test: \"" << old_test.getTag()
370  << "\" for entry \"" << result_entry.getTag() << "\"" << std::endl;
371  std::cout << " Existing Value: \"" << oldv_str << "\"" << std::endl;
372  std::cout << " New Value: \"" << new_results.getChild(result_entry.getTag()).getContentLine(0) << "\"" << std::endl << std::endl;
373  }
374  }
375  }
376  // An old value was not given in the new test: this is an error;
377  if(!exists) {
378  std::cout << "Error New test has same name as an existing one, but one of the old entries is missing." << std::endl;
379  deviation = true;
380  }
381  }
382 
383  if(deviation) { return_value = PerfTestFailed; }
384  else {
385  // Did someone add new values to the test?
386  if(new_results.numChildren()!=old_results.numChildren()) {
387  for(int new_r = 0; new_r < new_results.numChildren() ; new_r++) {
388  if(!old_results.hasChild(new_results.getChild(new_r).getTag())) {
389  old_results.addChild(new_results.getChild(new_r));
390  }
391  }
392 
393  return_value = PerfTestUpdatedTest;
394  }
395  }
396  }
397  } else { // End Test Exists
398  // Add new test if no match was found
399  old_tests.addChild(new_test);
400  return_value = PerfTestNewTest;
401  }
402  } // End MachineConfiguration Exists
403  } // End loop over MachineConfigurations
404 
405  // Did not find matching MachineConfiguration
406  if(is_new_config) {
407  XMLTestNode config("Configuration");
408  config.addChild(machine_config);
409  XMLTestNode tests("Tests");
410  tests.addChild(new_test);
411 
412  config.addChild(tests);
413  machine.addChild(config);
414 
415  return_value = PerfTestNewConfiguration;
416  }
417  } else { // Machine Entry does not exist
418  XMLTestNode machine(hostname);
419 
420  XMLTestNode config("Configuration");
421  config.addChild(machine_config);
422  XMLTestNode tests("Tests");
423  tests.addChild(new_test);
424  config.addChild(tests);
425 
426  machine.addChild(config);
427 
428  database.addChild(machine);
429 
430  return_value = PerfTestNewMachine;
431  }
432 
433 
434  if(return_value>PerfTestPassed) {
435  std::ofstream fout(filename.c_str());
436  fout << database << std::endl;
437  }
438 
439  return return_value;
440 }
struct config_s config
real_number diff[2]
Definition: dweb.c:19
std::string normalization("CGS")
PerfTestResult
ReturnValues for PerfTest_CheckOrAdd_Test.
const char * filename
Definition: ioapi.h:135
void * memset(void *dest, int c, size_t n)
void char ipfint ipfint ipfint * k
Definition: IpBlas.cpp:44
int i
Definition: parse.c:193
Here is the call graph for this function:

◆ PerfTest_MachineConfig()

XMLTestNode Teuchos::PerfTest_MachineConfig ( )

PerfTest_MachineConfig generates a basic machine configuration XMLTestNode.

The function provides a starting point for a machine configuration. Users should add new entries to the returned XMLTestNode to provide test relevant machine configuration entries. For example Kokkos users might want to provide the name of the user Kokkos NodeType or Kokkos DeviceType. The returned config contains information mostly extracted from /proc/cpuinfo if possible. On non unix systems most values will be unknown. Entries are:

  • Compiler: The compiler name.
  • Compiler_Version: A compiler version number.
  • CPU_Name: The CPUs model name.
  • CPU_Sockets: Number of CPU sockets in the system.
  • CPU_Cores_Per_Socket: Number of CPU cores per socket.
  • CPU_Total_HyperThreads: Total number of threads in a node.

Definition at line 198 of file Teuchos_XMLPerfTestArchive.cpp.

198  {
199 
200  // Get CPUName, Number of Sockets, Number of Cores, Number of Hyperthreads
201  std::string cpuname("Undefined");
202  unsigned int threads = 0;
203  unsigned int cores_per_socket = 0;
204  unsigned int highest_socketid = 0;
205 
206  {
207  std::ifstream cpuinfo("/proc/cpuinfo");
208  std::string line;
209  if((cpuinfo.rdstate()&cpuinfo.failbit)) std::cout<<"Failed to open filen\n";
210  while (!cpuinfo.eof() && !(cpuinfo.rdstate()&cpuinfo.failbit)) {
211  getline (cpuinfo,line);
212  if (line.find("model name") < line.size()) {
213  cpuname = line.substr(line.find(":")+2);
214  threads++;
215  }
216  if (line.find("physical id") < line.size()) {
217  unsigned int socketid = atoi(line.substr(line.find(":")+2).c_str());
218  highest_socketid = highest_socketid>socketid?highest_socketid:socketid;
219  }
220  if (line.find("cpu cores") < line.size()) {
221  cores_per_socket = atoi(line.substr(line.find(":")+2).c_str());
222  }
223  }
224  }
225 
226 
227  XMLTestNode machine_config("MachineConfiguration");
228 
229  machine_config.addString("Compiler", TEUCHOS_COMPILER_NAME);
230  machine_config.addInt("Compiler_Version", TEUCHOS_COMPILER_VERSION);
231  machine_config.addString("CPU_Name", cpuname);
232  machine_config.addInt("CPU_Sockets", highest_socketid+1);
233  machine_config.addInt("CPU_Cores_Per_Socket", cores_per_socket);
234  machine_config.addInt("CPU_Total_HyperThreads", threads);
235  return machine_config;
236 }
int line
Definition: de.c:117

◆ printValidParameters()

void Teuchos::printValidParameters ( const ParameterListAcceptor paramListAccpetor,
std::ostream &  out,
const bool  showDoc = true 
)

Pretty print the valid parameters from a ParameterListAccpetor object.

Definition at line 48 of file Teuchos_ParameterListAcceptorHelpers.cpp.

50 {
51  typedef ParameterList::PrintOptions PLPrintOptions;
52  paramListAccpetor.getValidParameters()->print(
53  out, PLPrintOptions().indent(2).showTypes(true).showDoc(showDoc)
54  );
55 }
void indent()
Definition: serializer.cpp:610
ParameterList::PrintOptions PLPrintOptions
Definition: cxx_main.cpp:63
Here is the call graph for this function:

◆ PT_SPEC() [1/4]

Teuchos::PT_SPEC ( double  ,
std::complex< float ,
std::complex< double  
)

◆ PT_SPEC() [2/4]

std::complex<double> Teuchos::PT_SPEC ( float  ,
std::complex< float ,
std::complex< float  
)

◆ PT_SPEC() [3/4]

std::complex<double> std::complex<double> Teuchos::PT_SPEC ( double  ,
float  ,
double   
)

◆ PT_SPEC() [4/4]

std::complex<double> std::complex<double> double Teuchos::PT_SPEC ( double  ,
int  ,
double   
)

◆ RANGE_VALIDATOR_TEST()

Teuchos::RANGE_VALIDATOR_TEST ( int  )
Here is the caller graph for this function:

◆ rcp()

template<class T , class Dealloc_T >
TEUCHOS_DEPRECATED RCP<T> Teuchos::rcp ( T *  p,
Dealloc_T  dealloc,
bool  owns_mem 
)
inline

Deprecated.

Definition at line 1219 of file Teuchos_RCPDecl.hpp.

1220 {
1221  return rcpWithDealloc(p, dealloc, owns_mem);
1222 }
RCP< T > rcpWithDealloc(T *p, Dealloc_T dealloc, bool owns_mem=true)
Initialize from a raw pointer with a deallocation policy.
mchunkptr p
Definition: g++malloc.c:1207
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RCP_createNewDeallocRCPNodeRawPtr()

template<class T , class Dealloc_T >
RCPNode* Teuchos::RCP_createNewDeallocRCPNodeRawPtr ( T *  p,
Dealloc_T  dealloc,
bool  has_ownership_in 
)
inline

Definition at line 99 of file Teuchos_RCP.hpp.

102 {
103  return new RCPNodeTmpl<T,Dealloc_T>(p, dealloc, has_ownership_in);
104 }
mchunkptr p
Definition: g++malloc.c:1207
Here is the caller graph for this function:

◆ RCP_createNewDeallocRCPNodeRawPtrUndefined()

template<class T , class Dealloc_T >
RCPNode* Teuchos::RCP_createNewDeallocRCPNodeRawPtrUndefined ( T *  p,
Dealloc_T  dealloc,
bool  has_ownership_in 
)
inline

Definition at line 109 of file Teuchos_RCP.hpp.

112 {
113  return new RCPNodeTmpl<T,Dealloc_T>(p, dealloc, has_ownership_in, null);
114 }
mchunkptr p
Definition: g++malloc.c:1207
Here is the caller graph for this function:

◆ RCP_createNewRCPNodeRawPtr()

template<class T >
RCPNode* Teuchos::RCP_createNewRCPNodeRawPtr ( T *  p,
bool  has_ownership_in 
)
inline

Definition at line 91 of file Teuchos_RCP.hpp.

92 {
93  return new RCPNodeTmpl<T,DeallocDelete<T> >(p, DeallocDelete<T>(), has_ownership_in);
94 }
mchunkptr p
Definition: g++malloc.c:1207
Here is the caller graph for this function:

◆ RCP_createNewRCPNodeRawPtrNonowned()

template<class T >
RCPNode* Teuchos::RCP_createNewRCPNodeRawPtrNonowned ( T *  p)
inline

Definition at line 75 of file Teuchos_RCP.hpp.

76 {
77  return new RCPNodeTmpl<T,DeallocNull<T> >(p, DeallocNull<T>(), false);
78 }
mchunkptr p
Definition: g++malloc.c:1207
Here is the caller graph for this function:

◆ RCP_createNewRCPNodeRawPtrNonownedUndefined()

template<class T >
RCPNode* Teuchos::RCP_createNewRCPNodeRawPtrNonownedUndefined ( T *  p)
inline

Definition at line 83 of file Teuchos_RCP.hpp.

84 {
85  return new RCPNodeTmpl<T,DeallocNull<T> >(p, DeallocNull<T>(), false, null);
86 }
mchunkptr p
Definition: g++malloc.c:1207

◆ readySend() [1/2]

template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view<ViewType>::value)>::type Teuchos::readySend ( const ViewType &  sendBuffer,
const Ordinal  count,
const int  destRank,
const int  tag,
const Comm< Ordinal > &  comm 
)

Variant of readySend() that accepts a message tag.

Definition at line 89 of file Kokkos_TeuchosCommAdapters.hpp.

94 {
95  readySend(sendBuffer.ptr_on_device(), count, destRank, tag, comm);
96 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819
void readySend(const Comm< Ordinal > &comm, const ArrayView< const Packet > &sendBuffer, const int destRank)
Ready-Send an array of objects that use values semantics to another process.
Here is the call graph for this function:

◆ readySend() [2/2]

template<typename Ordinal , typename Packet >
void Teuchos::readySend ( const Packet  sendBuffer[],
const Ordinal  count,
const int  destRank,
const int  tag,
const Comm< Ordinal > &  comm 
)

Variant of readySend() that accepts a message tag.

Definition at line 2502 of file Teuchos_CommHelpers.hpp.

2507 {
2508  TEUCHOS_COMM_TIME_MONITOR(
2509  "Teuchos::CommHelpers: readySend<"
2511  <<">( value type )"
2512  );
2513  typedef ConstValueTypeSerializationBuffer<Ordinal, Packet> buf_type;
2514  buf_type charSendBuffer (count, sendBuffer);
2515  comm.readySend (charSendBuffer.getBytes (),
2516  charSendBuffer.getCharBuffer (),
2517  destRank, tag);
2518 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819
char * name
Definition: lp_lib.h:823
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduce< int, int >() [1/2]

template<>
void Teuchos::reduce< int, int > ( const int  sendBuf[],
int  recvBuf[],
const int  count,
const EReductionType  reductType,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1512 of file Teuchos_CommHelpers.cpp.

1518 {
1519  TEUCHOS_COMM_TIME_MONITOR
1520  ("Teuchos::reduce<int, int> (" << count << ", " << toString (reductType)
1521  << ")");
1522  reduceImpl<int> (sendBuf, recvBuf, count, reductType, root, comm);
1523 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
local int root
Definition: enough.c:168
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduce< int, int >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduce< int, int > ( const int  sendBuf[],
int  recvBuf[],
const int  count,
const EReductionType  reductType,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1512 of file Teuchos_CommHelpers.cpp.

1518 {
1519  TEUCHOS_COMM_TIME_MONITOR
1520  ("Teuchos::reduce<int, int> (" << count << ", " << toString (reductType)
1521  << ")");
1522  reduceImpl<int> (sendBuf, recvBuf, count, reductType, root, comm);
1523 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
local int root
Definition: enough.c:168
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll() [1/3]

template<typename Ordinal , typename SendViewType , typename RecvViewType >
std::enable_if<(Kokkos::Impl::is_view<SendViewType>::value && Kokkos::Impl::is_view<RecvViewType>::value)>::type Teuchos::reduceAll ( const SendViewType &  sendBuf,
const RecvViewType &  recvBuf,
const EReductionType  reductionType,
const Comm< Ordinal > &  comm 
)

Definition at line 125 of file Kokkos_TeuchosCommAdapters.hpp.

129 {
130  // We can't use the array of intrinsic scalar type
131  // ((non_)const_array_intrinsic_type) here, because we're doing a
132  // reduction. That means we need to compute with the actual value
133  // type.
134  typedef typename SendViewType::value_type send_value_type;
135  typedef typename RecvViewType::value_type recv_value_type;
136 
137  const bool typesDiffer =
139  TEUCHOS_TEST_FOR_EXCEPTION(
140  typesDiffer, std::invalid_argument, "Teuchos::reduceAll: Send and receive "
141  "Views contain data of different types.");
142  TEUCHOS_TEST_FOR_EXCEPTION(
143  SendViewType::rank > 1 || RecvViewType::rank > 1, std::invalid_argument,
144  "Teuchos::reduceAll: Both send and receive Views must have rank 1. "
145  "The send View's rank is " << SendViewType::rank << " and the receive "
146  "View's rank is " << RecvViewType::rank << ".");
147  TEUCHOS_TEST_FOR_EXCEPTION(
148  sendBuf.dimension_0 () != recvBuf.dimension_0 (), std::invalid_argument,
149  "Send and receive buffer lengths do not match. sendBuf.dimension_0() = "
150  << sendBuf.dimension_0 () << " != recvBuf.dimension_0() = "
151  << recvBuf.dimension_0 () << ".");
152 
153  // mfh 04 Nov 2014: Don't let Teuchos::SerialComm do a deep copy;
154  // that always happens on the host, since SerialComm doesn't know
155  // about Kokkos.
156  if (comm.getSize () == 1) {
157  Kokkos::deep_copy (recvBuf, sendBuf);
158  }
159  else {
160  const Ordinal count = static_cast<Ordinal> (sendBuf.dimension_0 ());
161  reduceAll (comm, reductionType, count,
162  sendBuf.ptr_on_device (),
163  recvBuf.ptr_on_device ());
164  }
165 }
Teuchos_Ordinal Ordinal
class Kokkos::Compat::Deallocator deep_copy
int count
Definition: lp_lib.h:819
void reduceAll(const Comm< Ordinal > &comm, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet sendBuffer[], Packet globalReducts[])
Wrapper for MPI_Allreduce that takes a custom reduction operator.
REAL value
Definition: lp_lib.h:932
Here is the call graph for this function:

◆ reduceAll() [2/3]

template<typename Ordinal , typename Serializer , class SendViewType , class RecvViewType >
std::enable_if<(Kokkos::Impl::is_view<SendViewType>::value && Kokkos::Impl::is_view<RecvViewType>::value)>::type Teuchos::reduceAll ( const Comm< Ordinal > &  comm,
const Serializer serializer,
const EReductionType  reductType,
const Ordinal  count,
const SendViewType &  sendBuffer,
const RecvViewType &  recvBuffer 
)

Definition at line 171 of file Kokkos_TeuchosCommAdapters.hpp.

177 {
178  // We can't use the array of intrinsic scalar type
179  // ((non_)const_array_intrinsic_type) here, because we're doing a
180  // reduction. That means we need to compute with the actual value
181  // type.
182  typedef typename SendViewType::value_type send_value_type;
183  typedef typename RecvViewType::value_type recv_value_type;
184 
185  const bool typesDiffer =
187  TEUCHOS_TEST_FOR_EXCEPTION(
188  typesDiffer, std::invalid_argument, "Teuchos::reduceAll: Send and receive "
189  "Views contain data of different types.");
190  TEUCHOS_TEST_FOR_EXCEPTION(
191  SendViewType::rank > 1 || RecvViewType::rank > 1, std::invalid_argument,
192  "Teuchos::reduceAll: Both send and receive Views must have rank 1. "
193  "The send View's rank is " << SendViewType::rank << " and the receive "
194  "View's rank is " << RecvViewType::rank << ".");
195 
196  // mfh 04 Nov 2014: Don't let Teuchos::SerialComm do a deep copy;
197  // that always happens on the host, since SerialComm doesn't know
198  // about Kokkos.
199  if (comm.getSize () == 1) {
200  Kokkos::deep_copy (recvBuffer, sendBuffer);
201  }
202  else {
203  reduceAll (comm, serializer, reductType, count,
204  sendBuffer.ptr_on_device (),
205  recvBuffer.ptr_on_device ());
206  }
207 }
class Kokkos::Compat::Deallocator deep_copy
int count
Definition: lp_lib.h:819
void reduceAll(const Comm< Ordinal > &comm, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet sendBuffer[], Packet globalReducts[])
Wrapper for MPI_Allreduce that takes a custom reduction operator.
REAL value
Definition: lp_lib.h:932
Here is the call graph for this function:

◆ reduceAll() [3/3]

template<typename Ordinal , typename Packet >
TEUCHOS_DEPRECATED void Teuchos::reduceAll ( const Comm< Ordinal > &  comm,
const EReductionType  reductType,
const Packet &  send,
Packet *  globalReduct 
)

Deprecated .

Definition at line 377 of file Teuchos_CommHelpers.hpp.

381 {
382  reduceAll<Ordinal,Packet>(comm, reductType, send, ptr(globalReduct));
383 }
void send(const Comm< Ordinal > &comm, const Ordinal count, const Packet sendBuffer[], const int destRank)
Send objects that use values semantics to another process.
Ptr< T > ptr(T *p)
Create a pointer to an object from a raw pointer.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, char >() [1/2]

template<>
void Teuchos::reduceAll< int, char > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const char  sendBuffer[],
char  globalReducts[] 
)

Definition at line 1791 of file Teuchos_CommHelpers.cpp.

1796 {
1797  TEUCHOS_COMM_TIME_MONITOR(
1798  "Teuchos::reduceAll<int, char> (" << count << ", "
1799  << toString (reductType) << ")"
1800  );
1801  reduceAllImpl<char> (comm, reductType, count, sendBuffer, globalReducts);
1802 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, char >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, char > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const char  sendBuffer[],
char  globalReducts[] 
)

Definition at line 1791 of file Teuchos_CommHelpers.cpp.

1796 {
1797  TEUCHOS_COMM_TIME_MONITOR(
1798  "Teuchos::reduceAll<int, char> (" << count << ", "
1799  << toString (reductType) << ")"
1800  );
1801  reduceAllImpl<char> (comm, reductType, count, sendBuffer, globalReducts);
1802 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, double >() [1/2]

template<>
void Teuchos::reduceAll< int, double > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const double  sendBuffer[],
double  globalReducts[] 
)

Definition at line 961 of file Teuchos_CommHelpers.cpp.

966 {
967  TEUCHOS_COMM_TIME_MONITOR(
968  "Teuchos::reduceAll<int, double> (" << count << ", "
969  << toString (reductType) << ")"
970  );
971  reduceAllImpl<double> (comm, reductType, count, sendBuffer, globalReducts);
972 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, double >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, double > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const double  sendBuffer[],
double  globalReducts[] 
)

Definition at line 961 of file Teuchos_CommHelpers.cpp.

966 {
967  TEUCHOS_COMM_TIME_MONITOR(
968  "Teuchos::reduceAll<int, double> (" << count << ", "
969  << toString (reductType) << ")"
970  );
971  reduceAllImpl<double> (comm, reductType, count, sendBuffer, globalReducts);
972 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, float >() [1/2]

template<>
void Teuchos::reduceAll< int, float > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const float  sendBuffer[],
float  globalReducts[] 
)

Definition at line 1029 of file Teuchos_CommHelpers.cpp.

1034 {
1035  TEUCHOS_COMM_TIME_MONITOR(
1036  "Teuchos::reduceAll<int, float> (" << count << ", "
1037  << toString (reductType) << ")"
1038  );
1039  reduceAllImpl<float> (comm, reductType, count, sendBuffer, globalReducts);
1040 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, float >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, float > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const float  sendBuffer[],
float  globalReducts[] 
)

Definition at line 1029 of file Teuchos_CommHelpers.cpp.

1034 {
1035  TEUCHOS_COMM_TIME_MONITOR(
1036  "Teuchos::reduceAll<int, float> (" << count << ", "
1037  << toString (reductType) << ")"
1038  );
1039  reduceAllImpl<float> (comm, reductType, count, sendBuffer, globalReducts);
1040 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, int >() [1/2]

template<>
void Teuchos::reduceAll< int, int > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const int  sendBuffer[],
int  globalReducts[] 
)

Definition at line 1527 of file Teuchos_CommHelpers.cpp.

1532 {
1533  TEUCHOS_COMM_TIME_MONITOR(
1534  "Teuchos::reduceAll<int, int> (" << count << ", "
1535  << toString (reductType) << ")"
1536  );
1537  reduceAllImpl<int> (comm, reductType, count, sendBuffer, globalReducts);
1538 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, int >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, int > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const int  sendBuffer[],
int  globalReducts[] 
)

Definition at line 1527 of file Teuchos_CommHelpers.cpp.

1532 {
1533  TEUCHOS_COMM_TIME_MONITOR(
1534  "Teuchos::reduceAll<int, int> (" << count << ", "
1535  << toString (reductType) << ")"
1536  );
1537  reduceAllImpl<int> (comm, reductType, count, sendBuffer, globalReducts);
1538 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, long >() [1/2]

template<>
void Teuchos::reduceAll< int, long > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const long  sendBuffer[],
long  globalReducts[] 
)

Definition at line 1313 of file Teuchos_CommHelpers.cpp.

1318 {
1319  TEUCHOS_COMM_TIME_MONITOR(
1320  "Teuchos::reduceAll<int, long> (" << count << ", "
1321  << toString (reductType) << ")"
1322  );
1323  reduceAllImpl<long> (comm, reductType, count, sendBuffer, globalReducts);
1324 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, long > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const long  sendBuffer[],
long  globalReducts[] 
)

Definition at line 1313 of file Teuchos_CommHelpers.cpp.

1318 {
1319  TEUCHOS_COMM_TIME_MONITOR(
1320  "Teuchos::reduceAll<int, long> (" << count << ", "
1321  << toString (reductType) << ")"
1322  );
1323  reduceAllImpl<long> (comm, reductType, count, sendBuffer, globalReducts);
1324 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, long long >() [1/2]

template<>
void Teuchos::reduceAll< int, long long > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const long long  sendBuffer[],
long long  globalReducts[] 
)

Definition at line 1124 of file Teuchos_CommHelpers.cpp.

1129 {
1130  TEUCHOS_COMM_TIME_MONITOR(
1131  "Teuchos::reduceAll<int, long long> (" << count << ", "
1132  << toString (reductType) << ")"
1133  );
1134  reduceAllImpl<long long> (comm, reductType, count, sendBuffer, globalReducts);
1135 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, long long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, long long > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const long long  sendBuffer[],
long long  globalReducts[] 
)

Definition at line 1124 of file Teuchos_CommHelpers.cpp.

1129 {
1130  TEUCHOS_COMM_TIME_MONITOR(
1131  "Teuchos::reduceAll<int, long long> (" << count << ", "
1132  << toString (reductType) << ")"
1133  );
1134  reduceAllImpl<long long> (comm, reductType, count, sendBuffer, globalReducts);
1135 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, short >() [1/2]

template<>
void Teuchos::reduceAll< int, short > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const short  sendBuffer[],
short  globalReducts[] 
)

Definition at line 1714 of file Teuchos_CommHelpers.cpp.

1719 {
1720  TEUCHOS_COMM_TIME_MONITOR(
1721  "Teuchos::reduceAll<int, short> (" << count << ", "
1722  << toString (reductType) << ")"
1723  );
1724  reduceAllImpl<short> (comm, reductType, count, sendBuffer, globalReducts);
1725 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, short >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, short > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const short  sendBuffer[],
short  globalReducts[] 
)

Definition at line 1714 of file Teuchos_CommHelpers.cpp.

1719 {
1720  TEUCHOS_COMM_TIME_MONITOR(
1721  "Teuchos::reduceAll<int, short> (" << count << ", "
1722  << toString (reductType) << ")"
1723  );
1724  reduceAllImpl<short> (comm, reductType, count, sendBuffer, globalReducts);
1725 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, std::complex< double > >() [1/2]

template<>
void Teuchos::reduceAll< int, std::complex< double > > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const std::complex< double sendBuffer[],
std::complex< double globalReducts[] 
)

Definition at line 822 of file Teuchos_CommHelpers.cpp.

827 {
828  TEUCHOS_COMM_TIME_MONITOR(
829  "Teuchos::reduceAll<int, std::complex<double> > (" << count << ", "
830  << toString (reductType) << ")"
831  );
832  reduceAllImpl<std::complex<double> > (comm, reductType, count, sendBuffer, globalReducts);
833 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:

◆ reduceAll< int, std::complex< double > >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, std::complex< double > > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const std::complex< double sendBuffer[],
std::complex< double globalReducts[] 
)

Definition at line 822 of file Teuchos_CommHelpers.cpp.

827 {
828  TEUCHOS_COMM_TIME_MONITOR(
829  "Teuchos::reduceAll<int, std::complex<double> > (" << count << ", "
830  << toString (reductType) << ")"
831  );
832  reduceAllImpl<std::complex<double> > (comm, reductType, count, sendBuffer, globalReducts);
833 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:

◆ reduceAll< int, std::complex< float > >() [1/2]

template<>
void Teuchos::reduceAll< int, std::complex< float > > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const std::complex< float sendBuffer[],
std::complex< float globalReducts[] 
)

Definition at line 890 of file Teuchos_CommHelpers.cpp.

895 {
896  TEUCHOS_COMM_TIME_MONITOR(
897  "Teuchos::reduceAll<int, std::complex<float> > (" << count << ", "
898  << toString (reductType) << ")"
899  );
900  reduceAllImpl<std::complex<float> > (comm, reductType, count, sendBuffer, globalReducts);
901 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:

◆ reduceAll< int, std::complex< float > >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, std::complex< float > > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const std::complex< float sendBuffer[],
std::complex< float globalReducts[] 
)

Definition at line 890 of file Teuchos_CommHelpers.cpp.

895 {
896  TEUCHOS_COMM_TIME_MONITOR(
897  "Teuchos::reduceAll<int, std::complex<float> > (" << count << ", "
898  << toString (reductType) << ")"
899  );
900  reduceAllImpl<std::complex<float> > (comm, reductType, count, sendBuffer, globalReducts);
901 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:

◆ reduceAll< int, unsigned int >() [1/2]

template<>
void Teuchos::reduceAll< int, unsigned int > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const unsigned int  sendBuffer[],
unsigned int  globalReducts[] 
)

Definition at line 1620 of file Teuchos_CommHelpers.cpp.

1625 {
1626  TEUCHOS_COMM_TIME_MONITOR(
1627  "Teuchos::reduceAll<int, unsigned int> (" << count << ", "
1628  << toString (reductType) << ")"
1629  );
1630  reduceAllImpl<unsigned int> (comm, reductType, count, sendBuffer, globalReducts);
1631 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, unsigned int >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, unsigned int > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const unsigned int  sendBuffer[],
unsigned int  globalReducts[] 
)

Definition at line 1620 of file Teuchos_CommHelpers.cpp.

1625 {
1626  TEUCHOS_COMM_TIME_MONITOR(
1627  "Teuchos::reduceAll<int, unsigned int> (" << count << ", "
1628  << toString (reductType) << ")"
1629  );
1630  reduceAllImpl<unsigned int> (comm, reductType, count, sendBuffer, globalReducts);
1631 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, unsigned long >() [1/2]

template<>
void Teuchos::reduceAll< int, unsigned long > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const unsigned long  sendBuffer[],
unsigned long  globalReducts[] 
)

Definition at line 1407 of file Teuchos_CommHelpers.cpp.

1412 {
1413  TEUCHOS_COMM_TIME_MONITOR(
1414  "Teuchos::reduceAll<int, unsigned long> (" << count << ", "
1415  << toString (reductType) << ")"
1416  );
1417  reduceAllImpl<unsigned long> (comm, reductType, count, sendBuffer, globalReducts);
1418 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, unsigned long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, unsigned long > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const unsigned long  sendBuffer[],
unsigned long  globalReducts[] 
)

Definition at line 1407 of file Teuchos_CommHelpers.cpp.

1412 {
1413  TEUCHOS_COMM_TIME_MONITOR(
1414  "Teuchos::reduceAll<int, unsigned long> (" << count << ", "
1415  << toString (reductType) << ")"
1416  );
1417  reduceAllImpl<unsigned long> (comm, reductType, count, sendBuffer, globalReducts);
1418 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, unsigned long long >() [1/2]

template<>
void Teuchos::reduceAll< int, unsigned long long > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const unsigned long long  sendBuffer[],
unsigned long long  globalReducts[] 
)

Definition at line 1217 of file Teuchos_CommHelpers.cpp.

1222 {
1223  TEUCHOS_COMM_TIME_MONITOR(
1224  "Teuchos::reduceAll<int, unsigned long long> (" << count << ", "
1225  << toString (reductType) << ")"
1226  );
1227  reduceAllImpl<unsigned long long> (comm, reductType, count, sendBuffer, globalReducts);
1228 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceAll< int, unsigned long long >() [2/2]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::reduceAll< int, unsigned long long > ( const Comm< int > &  comm,
const EReductionType  reductType,
const int  count,
const unsigned long long  sendBuffer[],
unsigned long long  globalReducts[] 
)

Definition at line 1217 of file Teuchos_CommHelpers.cpp.

1222 {
1223  TEUCHOS_COMM_TIME_MONITOR(
1224  "Teuchos::reduceAll<int, unsigned long long> (" << count << ", "
1225  << toString (reductType) << ")"
1226  );
1227  reduceAllImpl<unsigned long long> (comm, reductType, count, sendBuffer, globalReducts);
1228 }
int count
Definition: lp_lib.h:819
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ relErr()

template<class Scalar >
ScalarTraits<Scalar>::magnitudeType Teuchos::relErr ( const Scalar &  s1,
const Scalar &  s2 
)

Return relative error of two scalars.

ToDo: Finish documentation!

Here is the caller graph for this function:

◆ scan()

template<typename Ordinal , typename Packet >
TEUCHOS_DEPRECATED void Teuchos::scan ( const Comm< Ordinal > &  comm,
const EReductionType  reductType,
const Packet &  send,
Packet *  scanReduct 
)

Deprecated.

Definition at line 458 of file Teuchos_CommHelpers.hpp.

462 {
463  scan(comm, reductType, send, ptr(scanReduct));
464 }
void send(const Comm< Ordinal > &comm, const Ordinal count, const Packet sendBuffer[], const int destRank)
Send objects that use values semantics to another process.
void scan(const Comm< Ordinal > &comm, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet sendBuffer[], Packet scanReducts[])
Scan/Reduce array of objects that use value semantics using a user-defined reduction operator...
Ptr< T > ptr(T *p)
Create a pointer to an object from a raw pointer.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scatter()

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::scatter ( const int  sendBuf[],
const int  sendCount,
int  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)
Here is the caller graph for this function:

◆ scatter< int, int >()

template<>
void Teuchos::scatter< int, int > ( const int  sendBuf[],
const int  sendCount,
int  recvBuf[],
const int  recvCount,
const int  root,
const Comm< int > &  comm 
)

Definition at line 1500 of file Teuchos_CommHelpers.cpp.

1506 {
1507  scatterImpl<int> (sendBuf, sendCount, recvBuf, recvCount, root, comm);
1508 }
local int root
Definition: enough.c:168

◆ send() [1/2]

template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view<ViewType>::value)>::type Teuchos::send ( const ViewType &  sendBuffer,
const Ordinal  count,
const int  destRank,
const int  tag,
const Comm< Ordinal > &  comm 
)

Variant of send() that takes a tag (and restores the correct order of arguments).

Definition at line 65 of file Kokkos_TeuchosCommAdapters.hpp.

70 {
71  send(sendBuffer.ptr_on_device(), count, destRank, tag, comm);
72 }
void send(const Comm< Ordinal > &comm, const Ordinal count, const Packet sendBuffer[], const int destRank)
Send objects that use values semantics to another process.
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819
Here is the call graph for this function:

◆ send() [2/2]

template<typename Ordinal , typename Packet >
void Teuchos::send ( const Packet  sendBuffer[],
const Ordinal  count,
const int  destRank,
const int  tag,
const Comm< Ordinal > &  comm 
)

Variant of send() that takes a tag (and restores the correct order of arguments).

Definition at line 2323 of file Teuchos_CommHelpers.hpp.

2328 {
2329  TEUCHOS_COMM_TIME_MONITOR(
2330  "Teuchos::CommHelpers: send<"
2332  <<">( value type )"
2333  );
2334  ConstValueTypeSerializationBuffer<Ordinal,Packet> charSendBuffer (count, sendBuffer);
2335  comm.send (charSendBuffer.getBytes (), charSendBuffer.getCharBuffer (), destRank, tag);
2336 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819
char * name
Definition: lp_lib.h:823
Here is the call graph for this function:
Here is the caller graph for this function:

◆ send< int, double >() [1/4]

template<>
void Teuchos::send< int, double > ( const Comm< int > &  comm,
const int  count,
const double  sendBuffer[],
const int  destRank 
)

Definition at line 997 of file Teuchos_CommHelpers.cpp.

1001 {
1002  return sendImpl<double> (comm, count, sendBuffer, destRank);
1003 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, double >() [2/4]

template<>
void Teuchos::send< int, double > ( const double  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1007 of file Teuchos_CommHelpers.cpp.

1012 {
1013  return sendImpl<double> (sendBuffer, count, destRank, tag, comm);
1014 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, double >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, double > ( const Comm< int > &  comm,
const int  count,
const double  sendBuffer[],
const int  destRank 
)

Definition at line 997 of file Teuchos_CommHelpers.cpp.

1001 {
1002  return sendImpl<double> (comm, count, sendBuffer, destRank);
1003 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, double >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, double > ( const double  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1007 of file Teuchos_CommHelpers.cpp.

1012 {
1013  return sendImpl<double> (sendBuffer, count, destRank, tag, comm);
1014 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, float >() [1/4]

template<>
void Teuchos::send< int, float > ( const Comm< int > &  comm,
const int  count,
const float  sendBuffer[],
const int  destRank 
)

Definition at line 1065 of file Teuchos_CommHelpers.cpp.

1069 {
1070  return sendImpl<float> (comm, count, sendBuffer, destRank);
1071 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, float >() [2/4]

template<>
void Teuchos::send< int, float > ( const float  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1075 of file Teuchos_CommHelpers.cpp.

1080 {
1081  return sendImpl<float> (sendBuffer, count, destRank, tag, comm);
1082 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, float >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, float > ( const Comm< int > &  comm,
const int  count,
const float  sendBuffer[],
const int  destRank 
)

Definition at line 1065 of file Teuchos_CommHelpers.cpp.

1069 {
1070  return sendImpl<float> (comm, count, sendBuffer, destRank);
1071 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, float >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, float > ( const float  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1075 of file Teuchos_CommHelpers.cpp.

1080 {
1081  return sendImpl<float> (sendBuffer, count, destRank, tag, comm);
1082 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, int >() [1/4]

template<>
void Teuchos::send< int, int > ( const Comm< int > &  comm,
const int  count,
const int  sendBuffer[],
const int  destRank 
)

Definition at line 1563 of file Teuchos_CommHelpers.cpp.

1567 {
1568  return sendImpl<int> (comm, count, sendBuffer, destRank);
1569 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, int >() [2/4]

template<>
void Teuchos::send< int, int > ( const int  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1573 of file Teuchos_CommHelpers.cpp.

1578 {
1579  return sendImpl<int> (sendBuffer, count, destRank, tag, comm);
1580 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, int >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, int > ( const Comm< int > &  comm,
const int  count,
const int  sendBuffer[],
const int  destRank 
)

Definition at line 1563 of file Teuchos_CommHelpers.cpp.

1567 {
1568  return sendImpl<int> (comm, count, sendBuffer, destRank);
1569 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, int >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, int > ( const int  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1573 of file Teuchos_CommHelpers.cpp.

1578 {
1579  return sendImpl<int> (sendBuffer, count, destRank, tag, comm);
1580 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, long >() [1/4]

template<>
void Teuchos::send< int, long > ( const Comm< int > &  comm,
const int  count,
const long  sendBuffer[],
const int  destRank 
)

Definition at line 1349 of file Teuchos_CommHelpers.cpp.

1353 {
1354  return sendImpl<long> (comm, count, sendBuffer, destRank);
1355 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, long >() [2/4]

template<>
void Teuchos::send< int, long > ( const long  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1359 of file Teuchos_CommHelpers.cpp.

1364 {
1365  return sendImpl<long> (sendBuffer, count, destRank, tag, comm);
1366 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, long >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, long > ( const Comm< int > &  comm,
const int  count,
const long  sendBuffer[],
const int  destRank 
)

Definition at line 1349 of file Teuchos_CommHelpers.cpp.

1353 {
1354  return sendImpl<long> (comm, count, sendBuffer, destRank);
1355 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, long >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, long > ( const long  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1359 of file Teuchos_CommHelpers.cpp.

1364 {
1365  return sendImpl<long> (sendBuffer, count, destRank, tag, comm);
1366 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, long long >() [1/4]

template<>
void Teuchos::send< int, long long > ( const Comm< int > &  comm,
const int  count,
const long long  sendBuffer[],
const int  destRank 
)

Definition at line 1160 of file Teuchos_CommHelpers.cpp.

1164 {
1165  return sendImpl<long long> (comm, count, sendBuffer, destRank);
1166 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, long long >() [2/4]

template<>
void Teuchos::send< int, long long > ( const long long  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1170 of file Teuchos_CommHelpers.cpp.

1175 {
1176  return sendImpl<long long> (sendBuffer, count, destRank, tag, comm);
1177 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, long long >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, long long > ( const Comm< int > &  comm,
const int  count,
const long long  sendBuffer[],
const int  destRank 
)

Definition at line 1160 of file Teuchos_CommHelpers.cpp.

1164 {
1165  return sendImpl<long long> (comm, count, sendBuffer, destRank);
1166 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, long long >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, long long > ( const long long  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1170 of file Teuchos_CommHelpers.cpp.

1175 {
1176  return sendImpl<long long> (sendBuffer, count, destRank, tag, comm);
1177 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, short >() [1/4]

template<>
void Teuchos::send< int, short > ( const Comm< int > &  comm,
const int  count,
const short  sendBuffer[],
const int  destRank 
)

Definition at line 1750 of file Teuchos_CommHelpers.cpp.

1754 {
1755  return sendImpl<short> (comm, count, sendBuffer, destRank);
1756 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, short >() [2/4]

template<>
void Teuchos::send< int, short > ( const short  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1760 of file Teuchos_CommHelpers.cpp.

1765 {
1766  return sendImpl<short> (sendBuffer, count, destRank, tag, comm);
1767 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, short >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, short > ( const Comm< int > &  comm,
const int  count,
const short  sendBuffer[],
const int  destRank 
)

Definition at line 1750 of file Teuchos_CommHelpers.cpp.

1754 {
1755  return sendImpl<short> (comm, count, sendBuffer, destRank);
1756 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, short >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, short > ( const short  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1760 of file Teuchos_CommHelpers.cpp.

1765 {
1766  return sendImpl<short> (sendBuffer, count, destRank, tag, comm);
1767 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, std::complex< double > >() [1/4]

template<>
void Teuchos::send< int, std::complex< double > > ( const Comm< int > &  comm,
const int  count,
const std::complex< double sendBuffer[],
const int  destRank 
)

Definition at line 858 of file Teuchos_CommHelpers.cpp.

862 {
863  sendImpl<std::complex<double> > (comm, count, sendBuffer, destRank);
864 }
int count
Definition: lp_lib.h:819

◆ send< int, std::complex< double > >() [2/4]

template<>
void Teuchos::send< int, std::complex< double > > ( const std::complex< double sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 868 of file Teuchos_CommHelpers.cpp.

873 {
874  sendImpl<std::complex<double> > (sendBuffer, count, destRank, tag, comm);
875 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, std::complex< double > >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, std::complex< double > > ( const Comm< int > &  comm,
const int  count,
const std::complex< double sendBuffer[],
const int  destRank 
)

Definition at line 858 of file Teuchos_CommHelpers.cpp.

862 {
863  sendImpl<std::complex<double> > (comm, count, sendBuffer, destRank);
864 }
int count
Definition: lp_lib.h:819

◆ send< int, std::complex< double > >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, std::complex< double > > ( const std::complex< double sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 868 of file Teuchos_CommHelpers.cpp.

873 {
874  sendImpl<std::complex<double> > (sendBuffer, count, destRank, tag, comm);
875 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, std::complex< float > >() [1/4]

template<>
void Teuchos::send< int, std::complex< float > > ( const Comm< int > &  comm,
const int  count,
const std::complex< float sendBuffer[],
const int  destRank 
)

Definition at line 926 of file Teuchos_CommHelpers.cpp.

930 {
931  return sendImpl<std::complex<float> > (comm, count, sendBuffer, destRank);
932 }
int count
Definition: lp_lib.h:819

◆ send< int, std::complex< float > >() [2/4]

template<>
void Teuchos::send< int, std::complex< float > > ( const std::complex< float sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 936 of file Teuchos_CommHelpers.cpp.

941 {
942  return sendImpl<std::complex<float> > (sendBuffer, count, destRank, tag, comm);
943 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, std::complex< float > >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, std::complex< float > > ( const Comm< int > &  comm,
const int  count,
const std::complex< float sendBuffer[],
const int  destRank 
)

Definition at line 926 of file Teuchos_CommHelpers.cpp.

930 {
931  return sendImpl<std::complex<float> > (comm, count, sendBuffer, destRank);
932 }
int count
Definition: lp_lib.h:819

◆ send< int, std::complex< float > >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, std::complex< float > > ( const std::complex< float sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 936 of file Teuchos_CommHelpers.cpp.

941 {
942  return sendImpl<std::complex<float> > (sendBuffer, count, destRank, tag, comm);
943 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, unsigned int >() [1/4]

template<>
void Teuchos::send< int, unsigned int > ( const Comm< int > &  comm,
const int  count,
const unsigned int  sendBuffer[],
const int  destRank 
)

Definition at line 1656 of file Teuchos_CommHelpers.cpp.

1660 {
1661  return sendImpl<unsigned int> (comm, count, sendBuffer, destRank);
1662 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, unsigned int >() [2/4]

template<>
void Teuchos::send< int, unsigned int > ( const unsigned int  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1666 of file Teuchos_CommHelpers.cpp.

1671 {
1672  return sendImpl<unsigned int> (sendBuffer, count, destRank, tag, comm);
1673 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, unsigned int >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, unsigned int > ( const Comm< int > &  comm,
const int  count,
const unsigned int  sendBuffer[],
const int  destRank 
)

Definition at line 1656 of file Teuchos_CommHelpers.cpp.

1660 {
1661  return sendImpl<unsigned int> (comm, count, sendBuffer, destRank);
1662 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, unsigned int >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, unsigned int > ( const unsigned int  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1666 of file Teuchos_CommHelpers.cpp.

1671 {
1672  return sendImpl<unsigned int> (sendBuffer, count, destRank, tag, comm);
1673 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, unsigned long >() [1/4]

template<>
void Teuchos::send< int, unsigned long > ( const Comm< int > &  comm,
const int  count,
const unsigned long  sendBuffer[],
const int  destRank 
)

Definition at line 1443 of file Teuchos_CommHelpers.cpp.

1447 {
1448  return sendImpl<unsigned long> (comm, count, sendBuffer, destRank);
1449 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, unsigned long >() [2/4]

template<>
void Teuchos::send< int, unsigned long > ( const unsigned long  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1453 of file Teuchos_CommHelpers.cpp.

1458 {
1459  return sendImpl<unsigned long> (sendBuffer, count, destRank, tag, comm);
1460 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, unsigned long >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, unsigned long > ( const Comm< int > &  comm,
const int  count,
const unsigned long  sendBuffer[],
const int  destRank 
)

Definition at line 1443 of file Teuchos_CommHelpers.cpp.

1447 {
1448  return sendImpl<unsigned long> (comm, count, sendBuffer, destRank);
1449 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, unsigned long >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, unsigned long > ( const unsigned long  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1453 of file Teuchos_CommHelpers.cpp.

1458 {
1459  return sendImpl<unsigned long> (sendBuffer, count, destRank, tag, comm);
1460 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, unsigned long long >() [1/4]

template<>
void Teuchos::send< int, unsigned long long > ( const Comm< int > &  comm,
const int  count,
const unsigned long long  sendBuffer[],
const int  destRank 
)

Definition at line 1253 of file Teuchos_CommHelpers.cpp.

1257 {
1258  return sendImpl<unsigned long long> (comm, count, sendBuffer, destRank);
1259 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, unsigned long long >() [2/4]

template<>
void Teuchos::send< int, unsigned long long > ( const unsigned long long  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1263 of file Teuchos_CommHelpers.cpp.

1268 {
1269  return sendImpl<unsigned long long> (sendBuffer, count, destRank, tag, comm);
1270 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ send< int, unsigned long long >() [3/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, unsigned long long > ( const Comm< int > &  comm,
const int  count,
const unsigned long long  sendBuffer[],
const int  destRank 
)

Definition at line 1253 of file Teuchos_CommHelpers.cpp.

1257 {
1258  return sendImpl<unsigned long long> (comm, count, sendBuffer, destRank);
1259 }
int count
Definition: lp_lib.h:819
Here is the caller graph for this function:

◆ send< int, unsigned long long >() [4/4]

template<>
TEUCHOSCOMM_LIB_DLL_EXPORT void Teuchos::send< int, unsigned long long > ( const unsigned long long  sendBuffer[],
const int  count,
const int  destRank,
const int  tag,
const Comm< int > &  comm 
)

Definition at line 1263 of file Teuchos_CommHelpers.cpp.

1268 {
1269  return sendImpl<unsigned long long> (sendBuffer, count, destRank, tag, comm);
1270 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819

◆ set() [1/12]

testList Teuchos::set ( paramName1  ,
paramValue1   
)

◆ set() [2/12]

testList Teuchos::set ( paramName2  ,
paramValue2   
)

◆ set() [3/12]

testList Teuchos::set ( dependent1Name  ,
dependentValue   
)

◆ set() [4/12]

myDepList Teuchos::set ( dependee1  ,
"val1"   
)

◆ set() [5/12]

myDepList Teuchos::set ( dependee2  ,
true   
)

◆ set() [6/12]

myDepList Teuchos::set ( dependee3  ,
 
)

◆ set() [7/12]

myDepList Teuchos::set ( dependent1  ,
1.  0 
)

◆ set() [8/12]

myDepList Teuchos::set ( dependent2  ,
1.  0 
)

◆ set() [9/12]

myDepList Teuchos::set ( dependent3  ,
(float) 1.  0 
)

◆ set() [10/12]

myDepList Teuchos::set ( dependee2  ,
"val2"   
)

◆ set() [11/12]

myDepList Teuchos::set ( dependent1  ,
2.  0 
)

◆ set() [12/12]

myDepList Teuchos::set ( dependent2  ,
3.  0 
)

◆ showTestFailureLocation() [1/2]

void Teuchos::showTestFailureLocation ( bool  showTFL)

Set if TEUCHOS_PASS_FAIL(...) should print test failure location.

Definition at line 72 of file Teuchos_TestingHelpers.cpp.

73 {
74  showTestFailureLocationImpl() = showTFL;
75 }
Here is the caller graph for this function:

◆ showTestFailureLocation() [2/2]

bool Teuchos::showTestFailureLocation ( )

Return if TEUCHOS_PASS_FAIL(...) should print test failure location.

Definition at line 78 of file Teuchos_TestingHelpers.cpp.

79 {
80  return showTestFailureLocationImpl();
81 }

◆ ssend() [1/2]

template<typename Ordinal , class ViewType >
std::enable_if<(Kokkos::Impl::is_view<ViewType>::value)>::type Teuchos::ssend ( const ViewType &  sendBuffer,
const Ordinal  count,
const int  destRank,
const int  tag,
const Comm< Ordinal > &  comm 
)

Variant of ssend() that takes a tag (and restores the correct order of arguments).

Definition at line 77 of file Kokkos_TeuchosCommAdapters.hpp.

82 {
83  ssend(sendBuffer.ptr_on_device(), count, destRank, tag, comm);
84 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819
void ssend(const Comm< Ordinal > &comm, const Ordinal count, const Packet sendBuffer[], const int destRank)
Synchronously send objects that use values semantics to another process.
Here is the call graph for this function:

◆ ssend() [2/2]

template<typename Ordinal , typename Packet >
void Teuchos::ssend ( const Packet  sendBuffer[],
const Ordinal  count,
const int  destRank,
const int  tag,
const Comm< Ordinal > &  comm 
)

Variant of ssend() that takes a tag (and restores the correct order of arguments).

Definition at line 2359 of file Teuchos_CommHelpers.hpp.

2364 {
2365  TEUCHOS_COMM_TIME_MONITOR(
2366  "Teuchos::CommHelpers: ssend<"
2368  <<">( value type )"
2369  );
2370  typedef ConstValueTypeSerializationBuffer<Ordinal, Packet> buf_type;
2371  buf_type charSendBuffer (count, sendBuffer);
2372  comm.ssend (charSendBuffer.getBytes (),
2373  charSendBuffer.getCharBuffer (),
2374  destRank, tag);
2375 }
Definition: xmlparse.c:181
int count
Definition: lp_lib.h:819
char * name
Definition: lp_lib.h:823
Here is the call graph for this function:
Here is the caller graph for this function:

◆ strMatch()

bool Teuchos::strMatch ( const std::string &  fullMatchStr,
const std::string &  str 
)

Definition at line 117 of file Teuchos_UnitTestRepository.cpp.

118 {
119 
120  const std::string::size_type npos = std::string::npos;
121 
122  const int strLen = str.length();
123  const int fullMatchStrLen = fullMatchStr.length();
124 
125  if (fullMatchStrLen == 0) {
126  return true;
127  }
128 
129  const bool beginGlob = fullMatchStr[0] == '*';
130  const bool endGlob = fullMatchStr[fullMatchStrLen-1] == '*';
131 
132  const int matchStrLen =
133  fullMatchStrLen + (beginGlob ? -1 : 0) + (endGlob ? -1 : 0);
134 
135  if (matchStrLen == 0) {
136  return true;
137  }
138 
139  if (matchStrLen > strLen) {
140  return false;
141  }
142 
143  if (beginGlob && endGlob) {
144  return str.find(fullMatchStr.substr(1, matchStrLen)) != npos;
145  }
146 
147  if (endGlob) {
148  return fullMatchStr.substr(0, matchStrLen) == str.substr(0, matchStrLen);
149  }
150 
151  if (beginGlob) {
152  return fullMatchStr.substr(1, matchStrLen) ==
153  str.substr(strLen-matchStrLen, matchStrLen);
154  }
155 
156  return fullMatchStr == str;
157 
158 }
char * str
Definition: lp_lib.h:958

◆ TEST_ASSERT() [1/7]

Teuchos::TEST_ASSERT ( nonnull(readInCon )
Here is the caller graph for this function:

◆ TEST_ASSERT() [2/7]

Teuchos::TEST_ASSERT ( readInConList.  size() = =2)

◆ TEST_ASSERT() [3/7]

Teuchos::TEST_ASSERT ( readinDep2.  get() = =readinDep3.get())

◆ TEST_ASSERT() [4/7]

Teuchos::TEST_ASSERT ( castedDep1->  getValuesAndValidators).size( = =2)

◆ TEST_ASSERT() [5/7]

Teuchos::TEST_ASSERT ( castedDep2->  getValuesAndValidators).size( = =2)

◆ TEST_ASSERT() [6/7]

Teuchos::TEST_ASSERT ( castedDep1->  getDefaultValidator).is_null()

◆ TEST_ASSERT() [7/7]

Teuchos::TEST_ASSERT ( nonnull(castedDep2->getDefaultValidator())  )

◆ TEST_EQUALITY() [1/12]

Teuchos::TEST_EQUALITY ( readInDep1.  get(),
readInDep1.  get() 
)
Here is the caller graph for this function:

◆ TEST_EQUALITY() [2/12]

Teuchos::TEST_EQUALITY ( readInDep1->  getCondition) ->getTypeAttributeValue(,
DummyObjectGetter< BinCondition ::getDummyObject) ->getTypeAttributeValue( 
)

◆ TEST_EQUALITY() [3/12]

Teuchos::TEST_EQUALITY ( readInDep1->  getCondition) ->getTypeAttributeValue(,
DummyObjectGetter< NotCondition ::getDummyObject) ->getTypeAttributeValue( 
)

◆ TEST_EQUALITY() [4/12]

Teuchos::TEST_EQUALITY ( castedDep1->  getShowIf(),
simpleConVisDep->  getShowIf() 
)

◆ TEST_EQUALITY() [5/12]

Teuchos::TEST_EQUALITY ( castedDep2->  getShowIf(),
complexConVisDep->  getShowIf() 
)

◆ TEST_EQUALITY() [6/12]

Teuchos::TEST_EQUALITY ( castedDep1->  getCondition) ->getTypeAttributeValue(,
simpleConVisDep->  getCondition) ->getTypeAttributeValue( 
)

◆ TEST_EQUALITY() [7/12]

Teuchos::TEST_EQUALITY ( castedDep2->  getCondition) ->getTypeAttributeValue(,
complexConVisDep->  getCondition) ->getTypeAttributeValue( 
)

◆ TEST_EQUALITY() [8/12]

Teuchos::TEST_EQUALITY ( rcp_dynamic_cast< const EnhancedNumberValidator< double > >  castedDep1->getValuesAndValidators().find("val1") ->second, true) ->getMax(,
double1Vali->  getMax() 
)

◆ TEST_EQUALITY() [9/12]

Teuchos::TEST_EQUALITY ( rcp_dynamic_cast< const EnhancedNumberValidator< double > >  castedDep2->getValuesAndValidators().find("val1") ->second, true) ->getMax(,
double1Vali->  getMax() 
)

◆ TEST_EQUALITY() [10/12]

Teuchos::TEST_EQUALITY ( rcp_dynamic_cast< const EnhancedNumberValidator< double > >  castedDep1->getValuesAndValidators().find("val2") ->second, true) ->getMax(,
double2Vali->  getMax() 
)

◆ TEST_EQUALITY() [11/12]

Teuchos::TEST_EQUALITY ( rcp_dynamic_cast< const EnhancedNumberValidator< double > >  castedDep2->getValuesAndValidators().find("val2") ->second, true) ->getMax(,
double2Vali->  getMax() 
)

◆ TEST_EQUALITY() [12/12]

Teuchos::TEST_EQUALITY ( rcp_dynamic_cast< const EnhancedNumberValidator< double > >  castedDep2->getDefaultValidator(), true) ->getMax(,
defaultVali->  getMax() 
)

◆ TEST_THROW() [1/6]

Teuchos::TEST_THROW ( RCP< ParameterList missingDependeeList = getParametersFromXmlFile("MissingDependeeTag.xml", depSheet),
MissingDependeesException   
)
Here is the caller graph for this function:

◆ TEST_THROW() [2/6]

Teuchos::TEST_THROW ( RCP< ParameterList missingDependentsList = getParametersFromXmlFile("MissingDependentTag.xml", depSheet),
MissingDependentsException   
)

◆ TEST_THROW() [3/6]

Teuchos::TEST_THROW ( RCP< ParameterList missingDependeeList = getParametersFromXmlFile("MissingDependee.xml", depSheet),
MissingDependeeException   
)

◆ TEST_THROW() [4/6]

Teuchos::TEST_THROW ( RCP< ParameterList missingDependentList = getParametersFromXmlFile("MissingDependent.xml", depSheet),
MissingDependentException   
)

◆ TEST_THROW() [5/6]

Teuchos::TEST_THROW ( boolVisConverter.  fromDependencytoXMLboolVisDep, entryIDsMap, validatorIDsMap,
MissingDependeeException   
)

◆ TEST_THROW() [6/6]

Teuchos::TEST_THROW ( boolVisConverter.  fromDependencytoXMLboolVisDep, entryIDsMap, validatorIDsMap,
MissingDependentException   
)

◆ TestForException_getEnableStacktrace()

bool Teuchos::TestForException_getEnableStacktrace ( )

Get at runtime if stacktracing functionality is enabled when exceptions are thrown.

Definition at line 107 of file Teuchos_TestForException.cpp.

108 {
109  return loc_enableStackTrace();
110 }

◆ testList()

ParameterList Teuchos::testList ( "Condition Test List"  )

◆ testRelErr()

template<class Scalar >
bool Teuchos::testRelErr ( const std::string &  v1_name,
const Scalar &  v1,
const std::string &  v2_name,
const Scalar &  v2,
const std::string &  maxRelErr_error_name,
const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &  maxRelErr_error,
const std::string &  maxRelErr_warning_name,
const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &  maxRelErr_warning,
const Ptr< std::ostream > &  out 
)

Compute, check and optionally print the relative error in two scalars.

ToDo: Finish documentation!

Definition at line 584 of file Teuchos_TestingHelpers.hpp.

595 {
596  using std::endl;
597  typedef ScalarTraits<Scalar> ST;
598  typedef typename ST::magnitudeType ScalarMag;
599  typedef ScalarTraits<ScalarMag> SMT;
600  const ScalarMag rel_err = relErr( v1, v2 );
601  const bool success = ( !SMT::isnaninf(rel_err) && !SMT::isnaninf(maxRelErr_error)
602  && rel_err <= maxRelErr_error );
603  if (!is_null(out)) {
604  *out
605  << endl
606  << "Check: rel_err(" << v1_name << ", " << v2_name << ")\n"
607  << " = rel_err(" << v1 << ", " << v2 << ") "
608  << "= " << rel_err << endl
609  << " <= " << maxRelErr_error_name
610  << " = " << maxRelErr_error << " : " << passfail(success) << endl;
611  if( success && rel_err >= maxRelErr_warning ) {
612  *out
613  << "Warning! rel_err(" << v1_name << ", " << v2_name << ")\n"
614  << " = rel_err(" << v1 << ", " << v2 << ") "
615  << "= " << rel_err << endl
616  << " >= " << maxRelErr_warning_name
617  << " = " << maxRelErr_warning << "!\n";
618  }
619  }
620  return success;
621 }
ScalarTraits< Scalar >::magnitudeType relErr(const Scalar &s1, const Scalar &s2)
Return relative error of two scalars.
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
const std::string passfail(const bool result)
Return "passed" or "failed".
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TEUCHOS_STATIC_SETUP()

Teuchos::TEUCHOS_STATIC_SETUP ( )

Definition at line 109 of file RCPNodeHandle_UnitTests.cpp.

110 {
111 }
Here is the caller graph for this function:

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [1/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( DummyNS::UndefinedType  )

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [2/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( bool  )

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [3/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( char  )

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [4/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( signed  char)

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [5/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( unsigned  char)

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [6/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( short  int)

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [7/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( int  )

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [8/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( long  int)

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [9/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( unsigned short  int)

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [10/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( unsigned long  int)

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [11/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( float  )

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [12/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( double  )

◆ TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION() [13/13]

Teuchos::TEUCHOS_TYPE_NAME_TRAITS_BUILTIN_TYPE_SPECIALIZATION ( __float128  )

◆ TEUCHOS_UNIT_TEST() [1/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
create   
)

Definition at line 48 of file ConstNonconstObjectContainer.cpp.

48  {
49  ConstNonconstObjectContainer<std::vector<double> > vectorObj;
50  RCP<std::vector<double> > vec = rcp(new std::vector<double> );
51  vectorObj.initialize(vec); // nonconst
52  TEST_ASSERT( vectorObj.isConst() == false );
53 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Definition: gkregex.c:113

◆ TEUCHOS_UNIT_TEST() [2/224]

Teuchos::TEUCHOS_UNIT_TEST ( OrdinalIndex  ,
defaultConstruct   
)

Definition at line 48 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

49 {
50  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
51  ECHO(SIOVOCB::OrdinalIndex idx);
52  TEST_EQUALITY_CONST(idx.idx, -1); // Depends on implementation choice!
53 }

◆ TEUCHOS_UNIT_TEST() [3/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ParameterEntry  ,
testTypeFunctions   
)

Definition at line 49 of file ParameterEntry_UnitTest.cpp.

50 {
51  ParameterEntry intEntry;
52  intEntry.setValue(1);
53  TEST_ASSERT(intEntry.isType<int>());
54  TEST_ASSERT(!intEntry.isArray());
55  TEST_ASSERT(!intEntry.isTwoDArray());
56 
57  ParameterEntry doubleEntry;
58  doubleEntry.setValue(1.0);
59  TEST_ASSERT(doubleEntry.isType<double>());
60  TEST_ASSERT(!doubleEntry.isArray());
61  TEST_ASSERT(!doubleEntry.isTwoDArray());
62 
63  Array<int> intArray = tuple<int>(1,2,3);
64  ParameterEntry arrayEntry;
65  arrayEntry.setValue(intArray);
66  TEST_ASSERT(arrayEntry.isType<Array<int> >());
67  TEST_ASSERT(arrayEntry.isArray());
68  TEST_ASSERT(!arrayEntry.isTwoDArray());
69 
70  TwoDArray<double> twoDArray(3,3,3.0);
71  ParameterEntry twoDEntry(twoDArray);
72  TEST_ASSERT(twoDEntry.isType<TwoDArray<double> >());
73  TEST_ASSERT(twoDEntry.isTwoDArray());
74  TEST_ASSERT(!twoDEntry.isArray());
75 }
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [4/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParameterListHelpers  ,
toFromFile   
)

Definition at line 49 of file XMLParameterListHelpers_UnitTest.cpp.

50 {
51 
52  ParameterList A;
53  A.sublist("SublistA").set("param_a", "a");
54  A.sublist("SublistA").sublist("SublistB").set("param_b", "b");
55  out << "\nA:\n"; A.print(out);
56  writeParameterListToXmlFile(A, "A.xml");
57 
58  ParameterList B;
60  out << "\nB:\n"; B.print(out);
61  TEST_ASSERT( A == B );
62 
63 
65  getParameter<std::string>(B.sublist("SublistA", true), "param_a"),
66  "a");
68  getParameter<std::string>(B.sublist("SublistA", true).sublist("SublistB", true), "param_b"),
69  "b");
70 
71 }
Ptr< T > inoutArg(T &arg)
create a non-persisting (required or optional) input/output argument for a function call...
TEST_ASSERT(nonnull(readInCon))
char * A[COUNT]
Definition: smash_test.c:14
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromXmlFile(const std::string &xmlFileName, const Ptr< ParameterList > &paramList)
Reads XML parameters from a file and updates those already in the given parameter list...
void const ipfint const ipfint const ipfint const ipfint const ipfint const double const ipfint const ipfint const ipfint const ipfint ipfint const ipfint double * B
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void writeParameterListToXmlFile(const ParameterList &paramList, const std::string &xmlFileName, RCP< const DependencySheet > depSheet=null)
Write parameters and sublist to an XML file.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [5/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Functions  ,
SubtractionTests   
)

Serialization Tests for subtraction functions

Tests for subtraction functions

Definition at line 53 of file FunctionObject_Serialization_UnitTests.cpp.

53  {
54  RCP<SubtractionFunction<int> > intTester = rcp(
55  new SubtractionFunction<int>(10));
56 
57  XMLObject subFuncXML = FunctionObjectXMLConverterDB::convertFunctionObject(
58  intTester);
59 
60  std::string type = subFuncXML.getRequired(
61  FunctionObjectXMLConverter::getTypeAttributeName());
62  TEST_ASSERT(type == intTester->getTypeAttributeValue() );
63  int operand = subFuncXML.getRequired<int>(
64  SimpleFunctionXMLConverter<int>::getOperandAttributeName());
65  TEST_ASSERT(operand == intTester->getModifiyingOperand());
66 
67  RCP<FunctionObject> readIn =
68  FunctionObjectXMLConverterDB::convertXML(subFuncXML);
69  RCP<SubtractionFunction<int> > readInCasted =
70  rcp_dynamic_cast<SubtractionFunction<int> >(readIn);
71  TEST_ASSERT(readInCasted.get() != NULL);
73  readInCasted->getModifiyingOperand()
74  ==
75  intTester->getModifiyingOperand());
76 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [6/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ParameterList  ,
xmlUpdateAndBroadcast   
)

Definition at line 53 of file ParameterList_UnitTest_Parallel.cpp.

53  {
54  const RCP<const Comm<int> > comm = DefaultComm<int>::getComm();
55  // Test the broadcast functionality to avoid unscalable I/O collisions
56  std::string inputFile="input.xml";
57  ParameterList A;
58  ParameterList B;
59  updateParametersFromXmlFile(inputFile, outArg(A));
60  updateParametersFromXmlFileAndBroadcast(inputFile, outArg(B), *comm);
61  out << "B = " << B;
62  TEST_ASSERT( B.begin() != B.end() ); // Avoid false positive from empty lists
63 
64  // See if any process returned a failed (i.e. a non-zero local_failed)
65  const int local_failed = !(A == B);
66  int global_failed = -1;
67  reduceAll(*comm, Teuchos::REDUCE_SUM, local_failed, outArg(global_failed));
68  TEST_EQUALITY_CONST(global_failed, 0);
69 }
TEUCHOSCOMM_LIB_DLL_EXPORT void updateParametersFromXmlFileAndBroadcast(const std::string &xmlFileName, const Ptr< ParameterList > &paramList, const Comm< int > &comm, bool overwrite=true)
On processor rank = 0, reads XML parameters from a file and broadcasts them to all other processors...
TEST_ASSERT(nonnull(readInCon))
char * A[COUNT]
Definition: smash_test.c:14
void reduceAll(const Comm< Ordinal > &comm, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet sendBuffer[], Packet globalReducts[])
Wrapper for MPI_Allreduce that takes a custom reduction operator.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromXmlFile(const std::string &xmlFileName, const Ptr< ParameterList > &paramList)
Reads XML parameters from a file and updates those already in the given parameter list...
void const ipfint const ipfint const ipfint const ipfint const ipfint const double const ipfint const ipfint const ipfint const ipfint ipfint const ipfint double * B
Ptr< T > outArg(T &arg)
create a non-persisting (required or optional) output argument for a function call.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [7/224]

Teuchos::TEUCHOS_UNIT_TEST ( UnitTestHarness  ,
nonRootFails   
)

Definition at line 53 of file UnitTestHarness_Parallel_UnitTests.cpp.

53  {
54  out << "Pass on even procs but fail on other procs!\n";
55  const RCP<const Comm<int> > comm = DefaultComm<int>::getComm();
56  const int procRank = comm->getRank();
57  TEST_EQUALITY_CONST(procRank%2, 0);
58 }
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [8/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParameterListHelpers  ,
anonymousSublists   
)

Definition at line 54 of file XMLParameterListHelpers_AnonSublists.cpp.

55  {
56  // the sublists are missing names; that is allowed now
57  string anon_sublist(
58  "<ParameterList name=\"Parent\">\n"
59  " <ParameterList>\n"
60  " <Parameter name=\"param_a\" type=\"string\" value=\"a\"/>\n"
61  " <ParameterList>\n"
62  " <Parameter name=\"param_b\" type=\"string\" value=\"b\"/>\n"
63  " </ParameterList>\n"
64  " </ParameterList>\n"
65  "</ParameterList>\n");
66  StringInputSource src(anon_sublist);
67  XMLParser parser(src.stream());
68  XMLObject xmlprob = parser.parse();
69  XMLParameterListReader pl2xml;
70  ParameterList plTest;
71  TEST_NOTHROW( plTest = pl2xml.toParameterList(xmlprob) );
72  out << plTest;
73  }

◆ TEUCHOS_UNIT_TEST() [9/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParser  ,
simpletest   
)

Definition at line 54 of file XMLParser_test.cpp.

55 {
56 
57  /* create a ParameterList object */
58  ParameterList problem("Problem");
59  ParameterList solver("Solver");
60  ParameterList prec("Preconditioner");
61  prec.set("type", "ILUk"); // set some of these to isUsed for completeness
62  TEST_NOTHROW( prec.get<std::string>("type") );
63  prec.set("k", 2);
64  solver.set("Preconditioner",prec);
65  solver.set("type", "gmres"); // set some of these to isUsed for completeness
66  TEST_NOTHROW( solver.get<std::string>("type") );
67  solver.set("maxiters", 1000);
68  solver.set("restarts", 100);
69  solver.set("special1","\"&\""); // test the XML outputting and parsing for correctness
70  solver.set("special2","\'&\'"); // test the XML outputting and parsing for correctness
71  solver.set("special3","\"&\'"); // test the XML outputting and parsing for correctness
72  solver.set("tol", 1.0e-10); // set some of these to isUsed for completeness
73  TEST_NOTHROW( solver.get<double>("tol") );
74  problem.set("Solver",solver);
75 
76  std::cout << "*** ParameterList (original)" << std::endl;
77  std::cout << problem << std::endl;
78 
79  /* create an XML object from the ParameterList */
80  XMLParameterListWriter xml2pl;
81  XMLObject xmlprob1 = xml2pl.toXML(problem);
82 
83  /* write the XML to a std::string */
84  std::ostringstream ss;
85  ss << xmlprob1;
86  std::string strproblem = ss.str();
87 
88  std::cout << "*** XML from ParameterListParameterListWriter.toXML().toString()" << std::endl;
89  std::cout << xmlprob1 << std::endl;
90 
91  /* create a input source, parser to read the std::string */
92  StringInputSource src(strproblem);
93  XMLParser parser(src.stream());
94 
95  /* parse XML in a std::string */
96  XMLObject xmlprob2 = parser.parse();
97 
98  std::cout << "*** XML from XMLParser.parse()" << std::endl;
99  std::cout << xmlprob2 << std::endl;
100 
101  /* convert the new XML object to a ParameterList */
102  XMLParameterListReader pl2xml;
103  ParameterList problem2 = pl2xml.toParameterList(xmlprob2);
104 
105  std::cout << "*** ParameterList from XMLParameterListReader.toParameterList()" << std::endl;
106  std::cout << problem2 << std::endl;
107 
108  /* check that the new parameter list matches the old one */
109  TEST_EQUALITY(problem2, problem);
110 
111 }
void e()
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [10/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Conditions  ,
testConditions   
)

Test all the conditions

Definition at line 54 of file Condition_UnitTests.cpp.

54  {
55  //Settin up initial list
56  RCP<ParameterList> testingList = rcp(new ParameterList("Condition Testing List"));
57 
58  /*
59  * Testing for string condition
60  */
61  Array<std::string> validValues(tuple<std::string>("mountain dew", "pepsi", "coke", "fanta"));
62  RCP<StringValidator> stringVali1 = rcp(new StringValidator(validValues));
63 
64  testingList->set("string param", "fanta", "parameter for testing string conditions", stringVali1);
65 
66  StringCondition::ValueList conValues1(tuple<std::string>("pepsi", "coke"));
67  RCP<StringCondition> stringCon1 = rcp( new StringCondition(testingList->getEntryRCP("string param"), conValues1));
68  TEST_ASSERT(!stringCon1->isConditionTrue());
69  testingList->set("string param", "coke");
70  TEST_ASSERT(stringCon1->isConditionTrue());
71 
72  /*
73  * Testing for number condition
74  */
75  testingList->set("double param", 5.0, "parameter for testing number conditions");
76 
77  RCP<NumberCondition<double> > numberCon1 =
78  rcp( new NumberCondition<double>(testingList->getEntryRCP("double param")));
79  TEST_ASSERT(numberCon1->isConditionTrue());
80  testingList->set("double param", -1.0);
81  TEST_ASSERT(!numberCon1->isConditionTrue());
82 RCP<SubtractionFunction<double> > doubleTesterFunc = rcp( new SubtractionFunction<double>(100));
83  RCP<NumberCondition<double> > numberCon2 =
84  rcp( new NumberCondition<double>(testingList->getEntryRCP("double param"), doubleTesterFunc));
85  TEST_ASSERT(!numberCon2->isConditionTrue());
86  testingList->set("double param", 101.0);
87  TEST_ASSERT(numberCon2->isConditionTrue());
88 
89  /*
90  * Testing bool conditions
91  */
92  testingList->set("bool param", true, "parameter for testing bool conditions");
93 
94  RCP<BoolCondition> boolCon1 = rcp( new BoolCondition(testingList->getEntryRCP("bool param")));
95  TEST_ASSERT(boolCon1->isConditionTrue());
96  testingList->set("bool param", false);
97  TEST_ASSERT(!boolCon1->isConditionTrue());
98 
99  /*
100  * Test Not condition
101  */
102  RCP<NotCondition> notCon1 = rcp(new NotCondition(numberCon1));
103  TEST_ASSERT(!notCon1->isConditionTrue());
104  testingList->set("double param", -1.0);
105  TEST_ASSERT(notCon1->isConditionTrue());
106 
107  /*
108  * Test And condition
109  */
110  Condition::ConstConditionList conList1(tuple<RCP<const Condition> >(stringCon1, boolCon1));
111  RCP<AndCondition> andCon1 = rcp(new AndCondition(conList1));
112  TEST_ASSERT(!andCon1->isConditionTrue());
113  testingList->set("bool param", true);
114  TEST_ASSERT(andCon1->isConditionTrue());
115 
116  /*
117  * Testing or condition
118  */
119  testingList->set("bool param", false);
120  RCP<OrCondition> orCon1 = rcp(new OrCondition(conList1));
121  TEST_ASSERT(orCon1->isConditionTrue());
122  testingList->set("string param", "fanta");
123 
124  /*
125  * Testing equal condition
126  */
127  RCP<EqualsCondition> equalsCon1 = rcp(new EqualsCondition(conList1));
128  TEST_ASSERT(equalsCon1->isConditionTrue());
129  testingList->set("bool param", true);
130  TEST_ASSERT(!equalsCon1->isConditionTrue());
131 }
Tuple< T, 1 > tuple(const T &a)
Create a Tuple<T,1>.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
RCP< BoolCondition > boolCon1
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [11/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParser  ,
orderedWriteRead   
)

Definition at line 55 of file XMLParser_ordered.cpp.

56 {
57  out << endl;
58 
59  /* create a ParameterList object */
60  string xmlstring1;
61  ParameterList wrotepl1("Parent");
62  {
63  ParameterList c1("Child1");
64  ParameterList c2("Child2");
65  c1.set("cp1", "first1");
66  c1.set("cp2", "second1");
67  c2.set("cp3", "first2");
68  c2.set("cp4", "second2");
69  wrotepl1.set("FirstSublist",c1);
70  wrotepl1.set("SecondSublist",c2);
71  /* create an XML object from the ParameterList and write it to a string */
72  XMLParameterListWriter xml2pl;
73  XMLObject xmlprob = xml2pl.toXML(wrotepl1);
74  std::ostringstream ss;
75  ss << xmlprob;
76  xmlstring1 = ss.str();
77  out << "*** String 1" << endl;
78  out << xmlstring1 << endl;
79  }
80 
81  string xmlstring2;
82  ParameterList wrotepl2("Parent");
83  {
84  ParameterList c1("Child1");
85  ParameterList c2("Child2");
86  // swap the ordering
87  c1.set("cp2", "second1");
88  c1.set("cp1", "first1");
89  c2.set("cp4", "second2");
90  c2.set("cp3", "first2");
91  wrotepl2.set("SecondSublist",c2);
92  wrotepl2.set("FirstSublist",c1);
93  /* create an XML object from the ParameterList and write it to a string */
94  XMLParameterListWriter xml2pl;
95  XMLObject xmlprob = xml2pl.toXML(wrotepl2);
96  std::ostringstream ss;
97  ss << xmlprob;
98  xmlstring2 = ss.str();
99  out << "*** String 2" << endl;
100  out << xmlstring2 << endl;
101  }
102 
103  // the different PL orderings should be reflected in the ParameterLists and their XML string representations
104  TEST_INEQUALITY(wrotepl1, wrotepl2);
105  TEST_INEQUALITY(xmlstring1, xmlstring2);
106 
107  /* create a input source, parser to read the string */
108  ParameterList readpl1, readpl2;
109  {
110  StringInputSource src(xmlstring1);
111  XMLParser parser(src.stream());
112  XMLObject xmlprob = parser.parse();
113  XMLParameterListReader pl2xml;
114  readpl1 = pl2xml.toParameterList(xmlprob);
115  }
116  {
117  StringInputSource src(xmlstring2);
118  XMLParser parser(src.stream());
119  XMLObject xmlprob = parser.parse();
120  XMLParameterListReader pl2xml;
121  readpl2 = pl2xml.toParameterList(xmlprob);
122  }
123 
124  /* check that the parameter lists do not match */
125  TEST_INEQUALITY(readpl1, readpl2);
126 
127 }
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [12/224]

Teuchos::TEUCHOS_UNIT_TEST ( GetBaseObjVoidPtr  ,
polymorphicClasses   
)

Definition at line 55 of file GetBaseObjVoidPtr_UnitTests.cpp.

56 {
57  RCP<C> c_ptr(new C);
58  RCP<B1> b1_ptr = c_ptr;
59  RCP<B2> b2_ptr = c_ptr;
60  RCP<A> a_ptr = c_ptr;
61  TEST_EQUALITY( getBaseObjVoidPtr(&*c_ptr), static_cast<const void*>(&*c_ptr) );
62  TEST_EQUALITY( getBaseObjVoidPtr(&*b1_ptr), static_cast<const void*>(&*c_ptr) );
63  TEST_INEQUALITY( static_cast<const void*>(&*b1_ptr), static_cast<const void*>(&*c_ptr) );
64  TEST_EQUALITY( getBaseObjVoidPtr(&*b2_ptr), static_cast<const void*>(&*c_ptr) );
65  TEST_INEQUALITY( static_cast<const void*>(&*b2_ptr), static_cast<const void*>(&*c_ptr) );
66  TEST_EQUALITY( getBaseObjVoidPtr(&*a_ptr), static_cast<const void*>(&*c_ptr) );
67  TEST_INEQUALITY( static_cast<const void*>(&*a_ptr), static_cast<const void*>(&*c_ptr) );
68 }
const void * getBaseObjVoidPtr(T *p)
Return a const void* pointing to the base of an object.
Definition: PackageC.cpp:3
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [13/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
testValiDeps   
)

Test all the validator dependencies.

Definition at line 55 of file Dependencies_UnitTests.cpp.

55  {
56  RCP<ParameterList> My_deplist = rcp(new ParameterList);
57  RCP<DependencySheet> depSheet1 = rcp(new DependencySheet);
58 
59  /*
60  * Testing StringValidatorDependency
61  */
62  RCP<StringToIntegralParameterEntryValidator<int> >
63  stringFoodTypeValidator = rcp(
64  new StringToIntegralParameterEntryValidator<int>(
65  tuple<std::string>( "Cheese", "Soda", "Chips" )
66  ,"Food Type"
67  )
68  );
69 
70  RCP<StringToIntegralParameterEntryValidator<int> >
71  cheeseValidator = rcp(
72  new StringToIntegralParameterEntryValidator<int>(
73  tuple<std::string>( "Swiss", "American", "Super Awesome Cheese" )
74  ,"Food Selector"
75  )
76  );
77 
78  RCP<StringToIntegralParameterEntryValidator<int> >
79  sodaValidator = rcp(
80  new StringToIntegralParameterEntryValidator<int>(
81  tuple<std::string>( "Pepsi", "Coke", "Kurtis Cola", "Bad Cola" )
82  ,"Food Selector"
83  )
84  );
85 
86  RCP<StringToIntegralParameterEntryValidator<int> >
87  chipsValidator = rcp(
88  new StringToIntegralParameterEntryValidator<int>(
89  tuple<std::string>( "Lays", "Doritos", "Kurtis Super Awesome Brand" )
90  ,"Food Selector"
91  )
92  );
93 
94  StringValidatorDependency::ValueToValidatorMap testValidatorMap1;
95  testValidatorMap1["Cheese"] = cheeseValidator;
96  testValidatorMap1["Soda"] = sodaValidator;
97  testValidatorMap1["Chips"] = chipsValidator;
98 
99  ParameterList stringValiDepList = My_deplist->sublist(
100  "String Validator Dependency", false,
101  "String Validator Dependency testing list.");
102  stringValiDepList.set(
103  "Food Selector", "Swiss", "select the food you want", cheeseValidator);
104  stringValiDepList.set(
105  "Food Type",
106  "Cheese",
107  "String Validator Dependency Tester",
108  stringFoodTypeValidator);
109 
110  RCP<StringValidatorDependency>
111  stringValiDep = rcp(
112  new StringValidatorDependency(
113  stringValiDepList.getEntryRCP("Food Type"),
114  stringValiDepList.getEntryRCP("Food Selector"),
115  testValidatorMap1,
116  cheeseValidator
117  )
118  );
119 
120  depSheet1->addDependency(stringValiDep);
121 
122  TEST_NOTHROW(stringValiDepList.validateParameters(stringValiDepList));
123  TEST_ASSERT(depSheet1->hasDependents(
124  stringValiDepList.getEntryRCP("Food Type")));
125  RCP<const DependencySheet::DepSet> stringValiDepSet =
126  depSheet1->getDependenciesForParameter(
127  stringValiDepList.getEntryRCP("Food Type"));
128  TEST_ASSERT(stringValiDepSet->size() == 1);
129  stringValiDepList.set("Food Type","Soda");
130  stringValiDep->evaluate();
131  TEST_ASSERT(stringValiDepList.getEntry("Food Selector").validator()
132  ==
133  sodaValidator);
134  TEST_THROW(stringValiDepList.validateParameters(stringValiDepList),
135  Exceptions::InvalidParameterValue);
136  stringValiDepList.set("Food Selector", "Pepsi");
137  TEST_NOTHROW(stringValiDepList.validateParameters(stringValiDepList));
138 
139 
140  /*
141  * Tesing some different aspects of the StringValidatorDependency
142  */
143  ParameterList
144  stringValiDepList2 = My_deplist->sublist(
145  "String Validator Dependency (other validators)",
146  false,
147  "String validator testing"
148  );
149 
150  RCP<StringToIntegralParameterEntryValidator<int> >
151  stringRangeValidator = rcp(
152  new StringToIntegralParameterEntryValidator<int>(
153  tuple<std::string>( "1-10", "10-33", "50-60" ),
154  "Range selector"
155  )
156  );
157 
158  RCP<EnhancedNumberValidator<int> > range110Vali =
159  rcp(new EnhancedNumberValidator<int>(1,10));
160  RCP<EnhancedNumberValidator<int> > range1033Vali =
161  rcp(new EnhancedNumberValidator<int>(10,33));
162  RCP<EnhancedNumberValidator<int> > range5060Vali =
163  rcp(new EnhancedNumberValidator<int>(50,60));
164 
165  stringValiDepList2.set("Range selector", "1-10",
166  "selects the range to validate", stringRangeValidator);
167 
168  StringValidatorDependency::ValueToValidatorMap rangeValidatorMap1;
169  rangeValidatorMap1["1-10"] = range110Vali;
170  rangeValidatorMap1["10-33"] = range1033Vali;
171  rangeValidatorMap1["50-60"] = range5060Vali;
172  stringValiDepList2.set(
173  "RangeValue", 3, "the value of the range", range110Vali);
174 
175  RCP<StringValidatorDependency>
176  stringValiDep2 = RCP<StringValidatorDependency>(
177  new StringValidatorDependency(
178  stringValiDepList2.getEntryRCP("Range selector"),
179  stringValiDepList2.getEntryRCP("RangeValue"),
180  rangeValidatorMap1,
181  range110Vali
182  )
183  );
184 
185  depSheet1->addDependency(stringValiDep2);
186 
187  TEST_NOTHROW(stringValiDepList2.validateParameters(stringValiDepList2));
188  TEST_ASSERT(depSheet1->hasDependents(
189  stringValiDepList2.getEntryRCP("Range selector")));
190  RCP<const DependencySheet::DepSet> stringValiDepSet2 =
191  depSheet1->getDependenciesForParameter(
192  stringValiDepList2.getEntryRCP("Range selector"));
193  TEST_ASSERT(stringValiDepSet2->size() == 1);
194  stringValiDepList2.set("Range selector","50-60");
195  stringValiDep2->evaluate();
196  TEST_ASSERT(stringValiDepList2.getEntry("RangeValue").validator()
197  ==
198  range5060Vali);
199  TEST_THROW(stringValiDepList2.validateParameters(stringValiDepList2),
200  Exceptions::InvalidParameterValue);
201  stringValiDepList2.set("RangeValue", 55);
202  TEST_NOTHROW(stringValiDepList2.validateParameters(stringValiDepList2));
203 
204  /*
205  * Testing the BoolValidatorDependency.
206  */
207  ParameterList
208  boolValidatorDepList = My_deplist->sublist(
209  "Bool Validator Dependency List",
210  false,
211  "Bool Validator Dependency testing list."
212  );
213 
214  boolValidatorDepList.set("Use Validator?",
215  true, "truns the validator on and off");
216  RCP<EnhancedNumberValidator<int> > basicVali =
217  rcp(new EnhancedNumberValidator<int>(1,10));
218  RCP<EnhancedNumberValidator<int> > basicVali2 =
219  rcp(new EnhancedNumberValidator<int>());
220  boolValidatorDepList.set("do I have a validator?",
221  4, "does it have a validator?", basicVali);
222 
223  RCP<BoolValidatorDependency>
224  boolValiDep = RCP<BoolValidatorDependency>(
225  new BoolValidatorDependency(
226  boolValidatorDepList.getEntryRCP("Use Validator?"),
227  boolValidatorDepList.getEntryRCP("do I have a validator?"),
228  basicVali,
229  basicVali2
230  )
231  );
232 
233  depSheet1->addDependency(boolValiDep);
234 
235  TEST_ASSERT(depSheet1->hasDependents(
236  boolValidatorDepList.getEntryRCP("Use Validator?")));
237  TEST_ASSERT(
238  boolValidatorDepList.getEntry("do I have a validator?").validator()
239  ==
240  basicVali);
241  TEST_NOTHROW(
242  boolValidatorDepList.validateParameters(boolValidatorDepList));
243  RCP<const DependencySheet::DepSet> boolValiDepSet =
244  depSheet1->getDependenciesForParameter(boolValidatorDepList.getEntryRCP(
245  "Use Validator?"));
246  TEST_ASSERT(boolValiDepSet->size() == 1);
247  boolValidatorDepList.set("Use Validator?",false);
248  boolValiDep->evaluate();
249  TEST_ASSERT(
250  boolValidatorDepList.getEntry("do I have a validator?").validator()
251  ==
252  basicVali2);
253 
254 
255  /*
256  * Testing the RangeValidatorDependency
257  */
258  RCP<StringToIntegralParameterEntryValidator<int> >
259  lowTempCheeseValidator = rcp(
260  new StringToIntegralParameterEntryValidator<int>(
261  tuple<std::string>( "PepperJack", "Swiss", "American" ),
262  "Cheese to Fondue"
263  )
264  );
265 
266  RCP<StringToIntegralParameterEntryValidator<int> >
267  highTempCheeseValidator = rcp(
268  new StringToIntegralParameterEntryValidator<int>(
269  tuple<std::string>(
270  "Munster", "Provalone", "Kurtis Super Awesome Cheese"),
271  "Cheese to Fondue"
272  )
273  );
274 
275  RCP<StringToIntegralParameterEntryValidator<int> >
276  defaultCheeseValidator = rcp(
277  new StringToIntegralParameterEntryValidator<int>(
278  tuple<std::string>(
279  "Other cheese", "other cheese 1", "other cheese 3"),
280  "Cheese to Fondue"
281  )
282  );
283 
284  ParameterList&
285  rangeValidatorDepList = My_deplist->sublist(
286  "Range Validator Dependency List",
287  false,
288  "Range Validator Dependency testing list.\nWorking June 27th 2009"
289  );
290  rangeValidatorDepList.set(
291  "Temperature",101.0, "The temperature of the fondue");
292  rangeValidatorDepList.set(
293  "Cheese to Fondue", "Swiss",
294  "The cheese we'll be using in our fondue pot.", lowTempCheeseValidator);
295  RangeValidatorDependency<double>::RangeToValidatorMap tempranges;
296  tempranges[std::pair<double,double>(100,200)] = lowTempCheeseValidator;
297  tempranges[std::pair<double,double>(200,300)] = highTempCheeseValidator;
298  RCP<RangeValidatorDependency<double> >
299  cheeseTempDep = RCP<RangeValidatorDependency<double> >(
300  new RangeValidatorDependency<double>(
301  rangeValidatorDepList.getEntryRCP("Temperature"),
302  rangeValidatorDepList.getEntryRCP("Cheese to Fondue"),
303  tempranges,
304  defaultCheeseValidator
305  )
306  );
307  depSheet1->addDependency(cheeseTempDep);
308 
309  TEST_ASSERT(depSheet1->hasDependents(
310  rangeValidatorDepList.getEntryRCP("Temperature")));
311  RCP<const DependencySheet::DepSet> rangeValiDepSet =
312  depSheet1->getDependenciesForParameter(
313  rangeValidatorDepList.getEntryRCP("Temperature"));
314  TEST_ASSERT(rangeValiDepSet->size() == 1);
315  rangeValidatorDepList.set("Temperature",250.0);
316  cheeseTempDep->evaluate();
317  TEST_ASSERT(
318  rangeValidatorDepList.getEntry("Cheese to Fondue").validator()
319  ==
320  highTempCheeseValidator);
321  TEST_THROW(
322  rangeValidatorDepList.validateParameters(rangeValidatorDepList),
323  Exceptions::InvalidParameterValue);
324  rangeValidatorDepList.set("Cheese to Fondue", "Provalone");
325  TEST_NOTHROW(
326  rangeValidatorDepList.validateParameters(rangeValidatorDepList));
327  rangeValidatorDepList.set("Temperature", 50.0);
328  cheeseTempDep->evaluate();
329  TEST_ASSERT(
330  rangeValidatorDepList.getEntry("Cheese to Fondue").validator()
331  ==
332  defaultCheeseValidator
333  );
334 
335 }
RCP< DependencySheet > depSheet1
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [14/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
DefaultConstruct   
)

Definition at line 56 of file ConstNonconstObjectContainer.cpp.

56  {
57  ConstNonconstObjectContainer<std::vector<double> > vectorObj;
58  TEST_ASSERT( vectorObj.isConst() == true );
59  TEST_ASSERT( vectorObj.getConstObj() == null );
60  // This does not throw an exception because the pointer is null
61  TEST_ASSERT( vectorObj.getNonconstObj() == null );
62 }
TEST_ASSERT(nonnull(readInCon))
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [15/224]

Teuchos::TEUCHOS_UNIT_TEST ( OrdinalIndex  ,
construct   
)

Definition at line 56 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

57 {
58  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
59  ECHO(SIOVOCB::OrdinalIndex idx(5));
60  TEST_EQUALITY_CONST(idx.idx, 5);
61 }

◆ TEUCHOS_UNIT_TEST() [16/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParser  ,
ParseFile   
)

Definition at line 57 of file XMLParser_ParseFileForError.cpp.

58  {
59  FileInputSource src(filename);
61  while (1) {
62  unsigned char c;
63  TEUCHOS_TEST_FOR_EXCEPTION( stream->readBytes(&c,1) < 1, std::runtime_error, "Failure reading error message from test file." );
64  if (c == '\n') break;
65  if (c != '\r') error.push_back(c);
66  }
67  out << "Expected error string: \"" << error << "\"" << std::endl;
68  bool caughtError = false;
69  try {
70  XMLParser parser(stream);
71  parser.parse();
72  }
73  catch (std::runtime_error &err) {
74  std::string what = err.what();
75  caughtError = true;
76  out << "Caught exception:\n" << what << "\n";
77  TEST_INEQUALITY_CONST( what.find(error), std::string::npos );
78  }
79  TEST_EQUALITY_CONST(caughtError, true);
80  }
const char * filename
Definition: ioapi.h:135
virtual unsigned int readBytes(unsigned char *const toFill, const unsigned int maxToRead)=0
Read up to maxToRead bytes from the stream.
voidpf stream
Definition: ioapi.h:136
std::string error
size_t jm_callbacks * c
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [17/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParser  ,
IgnoreDeclarations   
)

Definition at line 57 of file XMLParser_ParseWithoutFailing.cpp.

58  {
59  FileInputSource src(filename);
61  XMLParser parser(stream);
62  bool caughtError = false;
63  try {
64  Teuchos::XMLObject obj = parser.parse();
65  out << "Parsed XML object: \n" << obj.toString() << std::endl;
66  }
67  catch (std::runtime_error &err) {
68  caughtError = true;
69  out << "XML Parser caught exception:\n" << err.what() << "\n";
70  }
71  TEST_EQUALITY_CONST(caughtError, false);
72  }
std::string toString() const
Represent this node and its children as a std::string.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
const char * filename
Definition: ioapi.h:135
voidpf stream
Definition: ioapi.h:136
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [18/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validators  ,
numberValidators   
)

Tests Number Validators.

Definition at line 57 of file Validator_UnitTest.cpp.

58 {
59  /*
60  * Testing Int Validator.
61  */
62  RCP<ParameterList> intList =
63  rcp(new ParameterList("Int List"));
64  RCP<EnhancedNumberValidator<int> > intVali =
65  rcp(new EnhancedNumberValidator<int>(0,10,4));
66  TEST_ASSERT(intVali->getMin() == 0);
67  TEST_ASSERT(intVali->getMax() == 10);
68  TEST_ASSERT(intVali->getStep() == 4);
69  TEST_ASSERT(intVali->hasMin());
70  TEST_ASSERT(intVali->hasMax());
71  RCP<EnhancedNumberValidator<int> > intVali2 =
72  rcp(new EnhancedNumberValidator<int>());
73  TEST_ASSERT(!intVali2->hasMin());
74  TEST_ASSERT(!intVali2->hasMax());
75  TEST_ASSERT(intVali2->getMin() == std::numeric_limits<int>::min());
76  TEST_ASSERT(intVali2->getMax() == std::numeric_limits<int>::max());
77  TEST_ASSERT(intVali2->getStep() == EnhancedNumberTraits<int>::defaultStep());
78  intList->set("Int Parameter", 5, "int parameter", intVali);
79  TEST_NOTHROW(intList->validateParameters(*intList));
80  TEST_THROW(intList->set("Int Parameter", 11),
81  Exceptions::InvalidParameterValue);
82  TEST_THROW(intList->set("Double Parameter", 5.0, "double parameter", intVali),
83  Exceptions::InvalidParameterType);
84 
85  // Test String Conversions with int
86  RCP<ParameterList> validList = rcp(new ParameterList("Valid List"));
87  RCP<ParameterList> userList = rcp(new ParameterList("User List"));
88  TEST_NOTHROW(validList->set("Int Parameter", 4, "int parameter",
89  intVali));
90 #ifdef HAVE_TEUCHOSCORE_CXX11
91  TEST_NOTHROW(userList->set("Int Parameter", "x4"));
92  TEST_THROW(userList->validateParameters(*validList),
93  Exceptions::InvalidArgument);
94  TEST_NOTHROW(userList->set("Int Parameter", "4x"));
95  TEST_THROW(userList->validateParameters(*validList),
96  Exceptions::InvalidArgument);
97  TEST_NOTHROW(userList->set("Int Parameter", "12")); // ok string bad range
98  TEST_THROW(userList->validateParameters(*validList),
99  Exceptions::InvalidArgument);
100 #endif
101  userList = rcp(new ParameterList("User List"));
102  TEST_NOTHROW(userList->set("Int Parameter", 4));
103  TEST_NOTHROW(userList->validateParametersAndSetDefaults(*validList));
104  TEST_NOTHROW(userList->set("Int Parameter", "8"));
105  TEST_NOTHROW(userList->validateParametersAndSetDefaults(*validList));
106  int readInt = userList->getEntry("Int Parameter").getValue<int>(&readInt);
107  TEST_ASSERT(readInt == 8);
108 
109  // check string can generate out of range
110  userList = rcp(new ParameterList("User List"));
111  TEST_NOTHROW(userList->set("Int Parameter", "20"));
112  TEST_THROW(userList->validateParameters(*validList),
113  Exceptions::InvalidParameterType);
114 
115  /*
116  * Testing Short Validator.
117  */
118  RCP<ParameterList> shortList =
119  rcp(new ParameterList("Short List"));
120  RCP<EnhancedNumberValidator<short> > shortVali =
121  rcp(new EnhancedNumberValidator<short>(0,10,4));
122  TEST_ASSERT(shortVali->getMin() == 0);
123  TEST_ASSERT(shortVali->getMax() == 10);
124  TEST_ASSERT(shortVali->getStep() == 4);
125  TEST_ASSERT(shortVali->hasMin());
126  TEST_ASSERT(shortVali->hasMax());
127  RCP<EnhancedNumberValidator<short> > shortVali2 =
128  rcp(new EnhancedNumberValidator<short>());
129  TEST_ASSERT(!shortVali2->hasMin());
130  TEST_ASSERT(!shortVali2->hasMax());
131  TEST_ASSERT(shortVali2->getMin() == std::numeric_limits<short>::min());
132  TEST_ASSERT(shortVali2->getMax() == std::numeric_limits<short>::max());
133  TEST_ASSERT(shortVali2->getStep() == EnhancedNumberTraits<short>::defaultStep());
134  shortList->set("Short Parameter", (short)5, "short parameter", shortVali);
135  TEST_NOTHROW(shortList->validateParameters(*shortList));
136  TEST_THROW(shortList->set("Short Parameter", (short)11),
137  Exceptions::InvalidParameterValue);
138  TEST_THROW(shortList->set("Double Parameter", 5.0, "double parameter", shortVali),
139  Exceptions::InvalidParameterType);
140 
141  // Test String Conversions with short
142  validList = rcp(new ParameterList("Valid List"));
143  userList = rcp(new ParameterList("User List"));
144  TEST_NOTHROW(validList->set("Short Parameter", (short)4, "short parameter",
145  shortVali));
146 #ifdef HAVE_TEUCHOSCORE_CXX11
147  TEST_NOTHROW(userList->set("Short Parameter", "x4"));
148  TEST_THROW(userList->validateParameters(*validList),
149  Exceptions::InvalidArgument);
150  TEST_NOTHROW(userList->set("Short Parameter", "4x"));
151  TEST_THROW(userList->validateParameters(*validList),
152  Exceptions::InvalidArgument);
153  TEST_NOTHROW(userList->set("Short Parameter", "12")); // ok string bad range
154  TEST_THROW(userList->validateParameters(*validList),
155  Exceptions::InvalidArgument);
156 #endif
157  userList = rcp(new ParameterList("User List"));
158  TEST_NOTHROW(userList->set("Short Parameter", (short)4));
159  TEST_NOTHROW(userList->validateParametersAndSetDefaults(*validList));
160  TEST_NOTHROW(userList->set("Short Parameter", "8"));
161  TEST_NOTHROW(userList->validateParametersAndSetDefaults(*validList));
162  short readShort = userList->getEntry("Short Parameter").getValue<short>(&readShort);
163  TEST_ASSERT(readShort == 8);
164 
165  // check string can generate out of range
166  userList = rcp(new ParameterList("User List"));
167  TEST_NOTHROW(userList->set("Short Parameter", "20"));
168  TEST_THROW(userList->validateParameters(*validList),
169  Exceptions::InvalidParameterType);
170 
171  /*
172  * Testing Float Validator.
173  */
174  RCP<ParameterList> floatList = rcp(new ParameterList("Float List"));
175  RCP<EnhancedNumberValidator<float> > floatVali =
176  rcp(new EnhancedNumberValidator<float>(0,10.0,4.0,6));
177  TEST_ASSERT(floatVali->getMin() == 0.0);
178  TEST_ASSERT(floatVali->getMax() == 10.0);
179  TEST_ASSERT(floatVali->getStep() == 4.0);
180  TEST_ASSERT(floatVali->getPrecision() == 6);
181  TEST_ASSERT(floatVali->hasMin());
182  TEST_ASSERT(floatVali->hasMax());
183  RCP<EnhancedNumberValidator<float> > floatVali2 =
184  rcp(new EnhancedNumberValidator<float>());
185  TEST_ASSERT(!floatVali2->hasMin());
186  TEST_ASSERT(!floatVali2->hasMax());
187  TEST_ASSERT(floatVali2->getMin() == EnhancedNumberTraits<float>::min());
188  TEST_ASSERT(floatVali2->getMax() == EnhancedNumberTraits<float>::max());
189  TEST_ASSERT(floatVali2->getStep() == EnhancedNumberTraits<float>::defaultStep());
190  TEST_ASSERT(floatVali2->getPrecision() == EnhancedNumberTraits<float>::defaultPrecision());
191  floatList->set("Float Parameter", (float)5.0, "float parameter", floatVali);
192  TEST_NOTHROW(floatList->validateParameters(*floatList));
193  TEST_THROW(floatList->set("Float Parameter", (float)11.0),
194  Exceptions::InvalidParameterValue);
195  TEST_THROW(floatList->set("Int Parameter", 5, "int parameter", floatVali),
196  Exceptions::InvalidParameterType);
197 
198  // Test String Conversions with float
199  validList = rcp(new ParameterList("Valid List"));
200  userList = rcp(new ParameterList("User List"));
201  TEST_NOTHROW(validList->set("Float Parameter", (float)4.0, "float parameter",
202  floatVali));
203 #ifdef HAVE_TEUCHOSCORE_CXX11
204  TEST_NOTHROW(userList->set("Float Parameter", "x4.0"));
205  TEST_THROW(userList->validateParameters(*validList),
206  Exceptions::InvalidArgument);
207  TEST_NOTHROW(userList->set("Float Parameter", "4.0x"));
208  TEST_THROW(userList->validateParameters(*validList),
209  Exceptions::InvalidArgument);
210  TEST_NOTHROW(userList->set("Float Parameter", "12.0")); // ok string bad range
211  TEST_THROW(userList->validateParameters(*validList),
212  Exceptions::InvalidArgument);
213 #endif
214  userList = rcp(new ParameterList("User List"));
215  TEST_NOTHROW(userList->set("Float Parameter", (float)8.0));
216  TEST_NOTHROW(userList->validateParametersAndSetDefaults(*validList));
217  TEST_NOTHROW(userList->set("Float Parameter", "8.0"));
218  TEST_NOTHROW(userList->validateParametersAndSetDefaults(*validList));
219  float readFloat = userList->getEntry("Float Parameter").getValue<float>(&readFloat);
220  TEST_ASSERT(readFloat == 8.0);
221 
222  // check string can generate out of range
223  userList = rcp(new ParameterList("User List"));
224  TEST_NOTHROW(userList->set("Float Parameter", "20.0"));
225  TEST_THROW(userList->validateParameters(*validList),
226  Exceptions::InvalidParameterType);
227 
228  /*
229  * Testing Double Validator.
230  */
231  RCP<ParameterList> doubleList = rcp(new ParameterList("Double List"));
232  RCP<EnhancedNumberValidator<double> > doubleVali =
233  rcp(new EnhancedNumberValidator<double>(0,10.0,4.0,6));
234  TEST_ASSERT(doubleVali->getMin() == 0.0);
235  TEST_ASSERT(doubleVali->getMax() == 10.0);
236  TEST_ASSERT(doubleVali->getStep() == 4.0);
237  TEST_ASSERT(doubleVali->getPrecision() == 6);
238  TEST_ASSERT(doubleVali->hasMin());
239  TEST_ASSERT(doubleVali->hasMax());
240  RCP<EnhancedNumberValidator<double> > doubleVali2 =
241  rcp(new EnhancedNumberValidator<double>());
242  TEST_ASSERT(!doubleVali2->hasMin());
243  TEST_ASSERT(!doubleVali2->hasMax());
244  TEST_ASSERT(doubleVali2->getMin() == EnhancedNumberTraits<double>::min());
245  TEST_ASSERT(doubleVali2->getMax() == EnhancedNumberTraits<double>::max());
246  TEST_ASSERT(doubleVali2->getStep() == EnhancedNumberTraits<double>::defaultStep());
247  TEST_ASSERT(doubleVali2->getPrecision() == EnhancedNumberTraits<double>::defaultPrecision());
248  doubleList->set("Double Parameter", (double)5.0, "double parameter", doubleVali);
249  TEST_NOTHROW(doubleList->validateParameters(*doubleList));
250  TEST_THROW(doubleList->set("Double Parameter", (double)11.0),
251  Exceptions::InvalidParameterValue);
252  TEST_THROW(doubleList->set("Int Parameter", 5, "int parameter", doubleVali),
253  Exceptions::InvalidParameterType);
254 
255  // Test String Conversions with double
256  validList = rcp(new ParameterList("Valid List"));
257  userList = rcp(new ParameterList("User List"));
258  TEST_NOTHROW(validList->set("Double Parameter", 4.0, "double parameter",
259  doubleVali));
260 #ifdef HAVE_TEUCHOSCORE_CXX11
261  TEST_NOTHROW(userList->set("Double Parameter", "x4.0"));
262  TEST_THROW(userList->validateParameters(*validList),
263  Exceptions::InvalidArgument);
264  TEST_NOTHROW(userList->set("Double Parameter", "4.0x"));
265  TEST_THROW(userList->validateParameters(*validList),
266  Exceptions::InvalidArgument);
267  TEST_NOTHROW(userList->set("Double Parameter", "12.0"));
268  TEST_THROW(userList->validateParameters(*validList), // bad range
269  Exceptions::InvalidArgument);
270 #endif
271  userList = rcp(new ParameterList("Valid List"));
272  TEST_NOTHROW(userList->set("Double Parameter", 8.0));
273  TEST_NOTHROW(userList->validateParametersAndSetDefaults(*validList));
274  TEST_NOTHROW(userList->set("Double Parameter", "8.0"));
275  TEST_NOTHROW(userList->validateParametersAndSetDefaults(*validList));
276  double readDouble = userList->getEntry("Double Parameter").getValue<double>(&readDouble);
277  TEST_ASSERT(readDouble == 8.0);
278 
279  // check string can generate out of range
280  userList = rcp(new ParameterList("User List"));
281  TEST_NOTHROW(userList->set("Double Parameter", "20.0"));
282  TEST_THROW(userList->validateParameters(*validList),
283  Exceptions::InvalidParameterType);
284  }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
local int max
Definition: enough.c:167
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [19/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
ExistingSublistIsOkay   
)

Definition at line 60 of file ParameterList_XMLDuplicateSublists.cpp.

61  {
62  std::string xmlstring(
63  "<ParameterList> \n"
64  " <ParameterList name=\"SubList\">\n"
65  " </ParameterList> \n"
66  "</ParameterList> \n");
67  RCP<ParameterList> plist = getParametersFromXmlString(xmlstring);
68  updateParametersFromXmlString( xmlstring, plist() );
69  }
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > getParametersFromXmlString(const std::string &xmlStr)
Reads XML parameters from a std::string and return them in a new parameter list.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromXmlString(const std::string &xmlStr, const Ptr< ParameterList > &paramList, bool overwrite=true)
Reads XML parameters from a std::string and updates those already in the given parameter list...

◆ TEUCHOS_UNIT_TEST() [20/224]

Teuchos::TEUCHOS_UNIT_TEST ( UnitTestHarness  ,
nonRootThrowsTeuchosExcept   
)

Definition at line 61 of file UnitTestHarness_Parallel_UnitTests.cpp.

61  {
62  out << "Pass on even procs but throws Teuchos exception on other processes!\n";
63  const RCP<const Comm<int> > comm = DefaultComm<int>::getComm();
64  const int procRank = comm->getRank();
65  TEUCHOS_ASSERT_EQUALITY(procRank%2, 0); // Throws on non-root processes
66  int myval = 1;
67  TEST_EQUALITY_CONST(myval, 1);
68 }
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [21/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_TwoDArrays  ,
simpleTest   
)

Test all the validator dependencies.

Definition at line 62 of file TwoDArray_UnitTests.cpp.

62  {
63  TwoDArray<int> simpleArray(3,2);
64  simpleArray[0][0] =1;
65  simpleArray[0][1] =2;
66  simpleArray[1][0] =3;
67  simpleArray[1][1] =4;
68  simpleArray[2][0] =5;
69  simpleArray[2][1] =6;
70  TEST_EQUALITY_CONST(simpleArray[0][0],1)
71  TEST_EQUALITY_CONST(simpleArray[0][1],2)
72  TEST_EQUALITY_CONST(simpleArray[1][0],3)
73  TEST_EQUALITY_CONST(simpleArray[1][1],4)
74  TEST_EQUALITY_CONST(simpleArray[2][0],5)
75  TEST_EQUALITY_CONST(simpleArray[2][1],6)
76 
77  TEST_EQUALITY_CONST(simpleArray(0,0),1)
78  TEST_EQUALITY_CONST(simpleArray(0,1),2)
79  TEST_EQUALITY_CONST(simpleArray(1,0),3)
80  TEST_EQUALITY_CONST(simpleArray(1,1),4)
81  TEST_EQUALITY_CONST(simpleArray(2,0),5)
82  TEST_EQUALITY_CONST(simpleArray(2,1),6)
83 
84  TEST_EQUALITY_CONST(simpleArray.getNumRows(), 3)
85  TEST_EQUALITY_CONST(simpleArray.getNumCols(), 2)
86  Array<int> oneDArray = tuple<int>(1,2,3,4,5,6);
87  TEST_COMPARE_ARRAYS(oneDArray, simpleArray.getDataArray())
88 
89 }
Tuple< T, 1 > tuple(const T &a)
Create a Tuple<T,1>.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [22/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Conditions  ,
StringConditionSerialization   
)

Test all the conditions

Definition at line 62 of file Condition_Serialization_UnitTests.cpp.

62  {
63  ConditionXMLConverterDB::printKnownConverters(out);
64  std::string paramName1 = "string param";
65  std::string paramName2 = "string param2";
66  std::string dependent1Name = "dependent1";
67  std::string dependent2Name = "dependent2";
68  std::string paramValue = "cheese";
69  StringCondition::ValueList conditionVal1 = tuple<std::string>("steve");
70  StringCondition::ValueList conditionVal2 =
71  tuple<std::string>("steve", "blah", "your face");
72  ParameterList testList("Condition Test List");
73  testList.set(paramName1, paramValue);
74  testList.set(paramName2, paramValue);
75  testList.set(dependent1Name, paramValue);
76  testList.set(dependent2Name, paramValue);
77  RCP<StringCondition> simpleStringCon =
78  rcp(new StringCondition(testList.getEntryRCP(paramName1), conditionVal1));
79  RCP<StringCondition> complexStringCon =
80  rcp(new StringCondition(
81  testList.getEntryRCP(paramName2), conditionVal2));
82 
83  RCP<ConditionVisualDependency> simpleConDep =
84  rcp(new ConditionVisualDependency(
85  simpleStringCon,
86  testList.getEntryRCP(dependent1Name)));
87 
88  RCP<ConditionVisualDependency> complexConDep =
89  rcp(new ConditionVisualDependency(
90  complexStringCon,
91  testList.getEntryRCP(dependent2Name)));
92 
93  RCP<DependencySheet> depSheet1 = rcp(new DependencySheet);
94  depSheet1->addDependency(simpleConDep);
95  depSheet1->addDependency(complexConDep);
96 
98 
99  RCP<DependencySheet> depSheetIn = rcp(new DependencySheet);
100  RCP<ParameterList> readinList =
101  writeThenReadPL(testList, depSheet1, depSheetIn);
102 
103  RCP<ParameterEntry> readInDependee1 = readinList->getEntryRCP(paramName1);
104  RCP<ParameterEntry> readInDependee2 = readinList->getEntryRCP(paramName2);
105 
106  RCP<ConditionVisualDependency> simpleReadInDep =
107  rcp_dynamic_cast<ConditionVisualDependency>(
108  *(depSheetIn->getDependenciesForParameter(readInDependee1)->begin()));
110  simpleReadInDep->getCondition()->getTypeAttributeValue(),
111  DummyObjectGetter<StringCondition>::getDummyObject()->getTypeAttributeValue());
112  RCP<const StringCondition> simpleReadInCon =
113  rcp_dynamic_cast<const StringCondition>(simpleReadInDep->getCondition(), true);
114  TEST_ASSERT(nonnull(simpleReadInCon));
115 
116 
117  RCP<ConditionVisualDependency> complexReadInDep =
118  rcp_dynamic_cast<ConditionVisualDependency>(
119  *(depSheetIn->getDependenciesForParameter(readInDependee2)->begin()));
121  complexReadInDep->getCondition()->getTypeAttributeValue(),
122  DummyObjectGetter<StringCondition>::getDummyObject()->getTypeAttributeValue());
123  RCP<const StringCondition> complexReadInCon =
124  rcp_dynamic_cast<const StringCondition>(complexReadInDep->getCondition(), true);
125  TEST_ASSERT(nonnull(complexReadInCon));
126 
127 
128  TEST_COMPARE_ARRAYS(
129  simpleReadInCon->getValueList(), simpleStringCon->getValueList());
130  TEST_COMPARE_ARRAYS(
131  complexReadInCon->getValueList(), complexStringCon->getValueList());
132 
133 }
RCP< DependencySheet > depSheet1
RCP< DependencySheet > depSheetIn
ParameterList testList("Condition Test List")
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
bool nonnull(const ArrayRCP< T > &p)
Returns true if p.get()!=NULL.
RCP< ParameterList > readinList
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void writeParameterListToXmlOStream(const ParameterList &paramList, std::ostream &xmlOut, RCP< const DependencySheet > depSheet=null)
Write parameters and sublists in XML format to an std::ostream.
TEST_EQUALITY(readInDep1->getCondition() ->getTypeAttributeValue(), DummyObjectGetter< NotCondition >::getDummyObject() ->getTypeAttributeValue())
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
RCP< ParameterEntry > readInDependee2
StringCondition::ValueList conditionVal1
TEST_ASSERT(readInConList.size()==2)
RCP< ParameterEntry > readInDependee1
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [23/224]

Teuchos::TEUCHOS_UNIT_TEST ( KeyObjectPair  ,
defaultConstruct   
)

Definition at line 64 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

65 {
66  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
67  ECHO(SIOVOCB::KeyObjectPair<SIOVOCB::OrdinalIndex> kop);
68  TEST_EQUALITY_CONST(kop.first, "");
69  TEST_EQUALITY_CONST(kop.second.idx, -1);
70  TEST_EQUALITY_CONST(kop.isActive(), true);
71 }

◆ TEUCHOS_UNIT_TEST() [24/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
NonconstConstruct   
)

Definition at line 65 of file ConstNonconstObjectContainer.cpp.

65  {
66  RCP<std::vector<double> > vec = rcp(new std::vector<double> );
67  ConstNonconstObjectContainer<std::vector<double> > vectorObj(vec);
68  TEST_ASSERT( vectorObj.isConst() == false );
69  RCP<const std::vector<double> > vec2 = vectorObj.getConstObj();
70  TEST_ASSERT( vec == vec2 );
71  RCP<std::vector<double> > vec3 = vectorObj.getNonconstObj();
72  TEST_ASSERT( vec == vec3 );
73 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [25/224]

Teuchos::TEUCHOS_UNIT_TEST ( GetBaseObjVoidPtr  ,
nonPolymorphicClasses   
)

Definition at line 71 of file GetBaseObjVoidPtr_UnitTests.cpp.

72 {
73  RCP<E> e_ptr(new E);
74  RCP<D> d_ptr = e_ptr;
75  TEST_EQUALITY( getBaseObjVoidPtr(&*e_ptr), static_cast<const void*>(&*e_ptr) );
76  TEST_EQUALITY( getBaseObjVoidPtr(&*d_ptr), static_cast<const void*>(&*e_ptr) );
77 }
const void * getBaseObjVoidPtr(T *p)
Return a const void* pointing to the base of an object.
Definition: test_cpp.cc:193
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [26/224]

Teuchos::TEUCHOS_UNIT_TEST ( UnitTestHarness  ,
nonRootThrowsIntExcept   
)

Definition at line 71 of file UnitTestHarness_Parallel_UnitTests.cpp.

71  {
72  out << "Pass on even procs but throws int exception on other processes!\n";
73  const RCP<const Comm<int> > comm = DefaultComm<int>::getComm();
74  const int procRank = comm->getRank();
75  if (procRank%2 != 0) {
76  throw procRank;
77  }
78  int myval = 1;
79  TEST_EQUALITY_CONST(myval, 1);
80 }
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [27/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
XMLDuplicatedSublists   
)

Definition at line 71 of file ParameterList_XMLDuplicateSublists.cpp.

72  {
73  ParameterList pl;
74  TEST_THROW( updateParametersFromXmlFile(filename, inOutArg(pl) ), DuplicateParameterSublist );
75  TEST_THROW( getParametersFromXmlFile(filename), DuplicateParameterSublist );
76  TEST_THROW( getParametersFromXmlFile(filename,null), DuplicateParameterSublist );
77  //
78  std::ifstream fin(filename.c_str());
79  std::string xmlstring( (std::istreambuf_iterator<char>(fin)),
80  std::istreambuf_iterator<char>() );
81  TEST_THROW( updateParametersFromXmlString(xmlstring,inOutArg(pl) ), DuplicateParameterSublist );
82  TEST_THROW( getParametersFromXmlString(xmlstring), DuplicateParameterSublist );
83  TEST_THROW( getParametersFromXmlString(xmlstring,null), DuplicateParameterSublist );
84  }
Ptr< T > inOutArg(T &arg)
create a non-persisting (required or optional) input/output argument for a function call...
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > getParametersFromXmlString(const std::string &xmlStr)
Reads XML parameters from a std::string and return them in a new parameter list.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromXmlFile(const std::string &xmlFileName, const Ptr< ParameterList > &paramList)
Reads XML parameters from a file and updates those already in the given parameter list...
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
const char * filename
Definition: ioapi.h:135
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > getParametersFromXmlFile(const std::string &xmlFileName)
Reads XML parameters from a file and return them in a new parameter list.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromXmlString(const std::string &xmlStr, const Ptr< ParameterList > &paramList, bool overwrite=true)
Reads XML parameters from a std::string and updates those already in the given parameter list...
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [28/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ParameterList  ,
ADD_TYPE_AND_ARRAY_TYPE_PARAMETER   
)

Definition at line 71 of file ParameterList_SerializationTest.cpp.

72 {
73  ParameterList myList;
74  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(int, 2);
75  TEST_EQUALITY( getParameter<int>(myList, "int"), 2 );
76  TEST_EQUALITY( getParameter<Array<int> >(myList, "int Array"),
77  Array<int>(g_arraySize, as<int>(2)) );
78  TEST_EQUALITY( getParameter<TwoDArray<int> >(myList, "int 2DArray"),
79  TwoDArray<int>(g_arraySize, g_arraySize, as<int>(2)) );
80 }
T & getParameter(ParameterList &l, const std::string &name)
A templated helper function for getting a parameter from a non-const list. This helper function preve...
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [29/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParameterListHelpers  ,
OverwriteTest   
)

Definition at line 73 of file XMLParameterListHelpers_UnitTest.cpp.

74 {
75  ParameterList A;
76  A.set("conflicting param","a");
77  A.sublist("SublistA").set("param_a", "a");
78  A.sublist("SublistA").sublist("SublistB").set("param_b", "b");
79  out << "\nA:\n"; A.print(out);
80  std::stringstream Astream;
82 
83  // Overwrite
84  ParameterList B;
85  B.set("conflicting param","b");
86  updateParametersFromXmlString(Astream.str(), inoutArg(B),true);
87  out << "\nB:\n"; B.print(out);
88  TEST_ASSERT( A == B );
89  TEST_EQUALITY(getParameter<std::string>(B.sublist("SublistA", true), "param_a"),"a");
90  TEST_EQUALITY(getParameter<std::string>(B.sublist("SublistA", true).sublist("SublistB", true), "param_b"),"b");
91 
92 
93  // No Overwrite
94  ParameterList C;
95  C.set("conflicting param","c");
96  updateParametersFromXmlString(Astream.str(), inoutArg(B),false);
97  out << "\nC:\n"; C.print(out);
98  TEST_ASSERT( C.get("conflicting param","x") == "c" )
99  TEST_EQUALITY(getParameter<std::string>(B.sublist("SublistA", true), "param_a"),"a");
100  TEST_EQUALITY(getParameter<std::string>(B.sublist("SublistA", true).sublist("SublistB", true), "param_b"),"b");
101 
102 }
Ptr< T > inoutArg(T &arg)
create a non-persisting (required or optional) input/output argument for a function call...
C
Definition: cord.h:193
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void writeParameterListToXmlOStream(const ParameterList &paramList, std::ostream &xmlOut, RCP< const DependencySheet > depSheet=null)
Write parameters and sublists in XML format to an std::ostream.
TEST_ASSERT(nonnull(readInCon))
char * A[COUNT]
Definition: smash_test.c:14
void const ipfint const ipfint const ipfint const ipfint const ipfint const double const ipfint const ipfint const ipfint const ipfint ipfint const ipfint double * B
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromXmlString(const std::string &xmlStr, const Ptr< ParameterList > &paramList, bool overwrite=true)
Reads XML parameters from a std::string and updates those already in the given parameter list...
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [30/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ParameterList  ,
xmlUpdateAndBroadcastNoOverWrite   
)

Definition at line 73 of file ParameterList_UnitTest_Parallel.cpp.

73  {
74  const RCP<const Comm<int> > comm = DefaultComm<int>::getComm();
75  // Test the broadcast functionality to avoid unscalable I/O collisions
76  std::string inputFile="input.xml";
77  ParameterList A;
78  A.set("Transient",true);
79  A.set("Phalanx Graph Visualization Detail",2);
80 
81  ParameterList B;
82  B.set("Transient",true);
83  B.set("Phalanx Graph Visualization Detail",2);
84 
85 
86  updateParametersFromXmlFile(inputFile, outArg(A));
87  updateParametersFromXmlFileAndBroadcast(inputFile, outArg(B), *comm);
88  out << "B = " << B;
89  TEST_ASSERT( B.begin() != B.end() ); // Avoid false positive from empty lists
90 
91  // See if any process returned a failed (i.e. a non-zero local_failed)
92  const int local_failed = !(A == B);
93  int global_failed = -1;
94  reduceAll(*comm, Teuchos::REDUCE_SUM, local_failed, outArg(global_failed));
95  TEST_EQUALITY_CONST(global_failed, 0);
96 
97  // Check the assigned values.
98  TEST_EQUALITY( B.get("Transient",false), true)
99  TEST_EQUALITY_CONST( B.get("Phalanx Graph Visualization Detail",1), 2)
100 
101 }
TEUCHOSCOMM_LIB_DLL_EXPORT void updateParametersFromXmlFileAndBroadcast(const std::string &xmlFileName, const Ptr< ParameterList > &paramList, const Comm< int > &comm, bool overwrite=true)
On processor rank = 0, reads XML parameters from a file and broadcasts them to all other processors...
TEST_ASSERT(nonnull(readInCon))
char * A[COUNT]
Definition: smash_test.c:14
void reduceAll(const Comm< Ordinal > &comm, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet sendBuffer[], Packet globalReducts[])
Wrapper for MPI_Allreduce that takes a custom reduction operator.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromXmlFile(const std::string &xmlFileName, const Ptr< ParameterList > &paramList)
Reads XML parameters from a file and updates those already in the given parameter list...
void const ipfint const ipfint const ipfint const ipfint const ipfint const double const ipfint const ipfint const ipfint const ipfint ipfint const ipfint double * B
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Ptr< T > outArg(T &arg)
create a non-persisting (required or optional) output argument for a function call.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [31/224]

Teuchos::TEUCHOS_UNIT_TEST ( KeyObjectPair  ,
construct_default_isActive   
)

Definition at line 74 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

75 {
76  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
77  ECHO(SIOVOCB::KeyObjectPair<SIOVOCB::OrdinalIndex> kop("key_name1", 7));
78  TEST_EQUALITY_CONST(kop.first, "key_name1");
79  TEST_EQUALITY_CONST(kop.second.idx, 7);
80  TEST_EQUALITY_CONST(kop.isActive(), true);
81 }

◆ TEUCHOS_UNIT_TEST() [32/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParameterListHelpers  ,
anonymousParam   
)

Definition at line 75 of file XMLParameterListHelpers_AnonSublists.cpp.

76  {
77  // one parameter is missing a name; but all parameters are required to have a name
78  string anon_param(
79  "<ParameterList name=\"Parent\">\n"
80  " <ParameterList>\n"
81  " <Parameter name=\"param_a\" type=\"string\" value=\"a\"/>\n"
82  " <ParameterList>\n"
83  " <Parameter type=\"string\" value=\"b\"/>\n"
84  " </ParameterList>\n"
85  " </ParameterList>\n"
86  "</ParameterList>\n");
87  StringInputSource src(anon_param);
88  XMLParser parser(src.stream());
89  XMLObject xmlprob = parser.parse();
90  XMLParameterListReader pl2xml;
91  ParameterList plTest;
92  // this exception name is mis-spelled; oh well
93  TEST_THROW( plTest = pl2xml.toParameterList(xmlprob), NoNameAttributeExecption);
94  }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)

◆ TEUCHOS_UNIT_TEST() [33/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
ConstConstruct   
)

Definition at line 76 of file ConstNonconstObjectContainer.cpp.

76  {
77  RCP<const std::vector<double> > vec = rcp(new std::vector<double> );
78  ConstNonconstObjectContainer<std::vector<double> > vectorObj(vec);
79  TEST_ASSERT( vectorObj.isConst() == true );
80  RCP<const std::vector<double> > vec2 = vectorObj.getConstObj();
81  TEST_ASSERT( vec == vec2 );
82  RCP<std::vector<double> > vec3;
83  TEST_THROW( vec3 = vectorObj.getNonconstObj(), NonconstAccessError );
84 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [34/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Functions  ,
AdditionTests   
)

Tests for addition functions

Definition at line 78 of file FunctionObject_Serialization_UnitTests.cpp.

78  {
79  RCP<AdditionFunction<int> > intTester = rcp(
80  new AdditionFunction<int>(10));
81 
82  XMLObject addFuncXML = FunctionObjectXMLConverterDB::convertFunctionObject(
83  intTester);
84 
85  std::string type = addFuncXML.getRequired(
86  FunctionObjectXMLConverter::getTypeAttributeName());
87  TEST_ASSERT(type == intTester->getTypeAttributeValue() );
88  int operand = addFuncXML.getRequired<int>(
89  SimpleFunctionXMLConverter<int>::getOperandAttributeName());
90  TEST_ASSERT(operand == intTester->getModifiyingOperand());
91 
92  RCP<FunctionObject> readIn =
93  FunctionObjectXMLConverterDB::convertXML(addFuncXML);
94  RCP<AdditionFunction<int> > readInCasted =
95  rcp_dynamic_cast<AdditionFunction<int> >(readIn);
96  TEST_ASSERT(readInCasted.get() != NULL);
98  readInCasted->getModifiyingOperand()
99  ==
100  intTester->getModifiyingOperand());
101 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [35/224]

Teuchos::TEUCHOS_UNIT_TEST ( GetBaseObjVoidPtr  ,
nonPolymorphicBuiltInTypes   
)

Definition at line 80 of file GetBaseObjVoidPtr_UnitTests.cpp.

81 {
82  RCP<int> i_ptr(new int);
83  TEST_EQUALITY( getBaseObjVoidPtr(&*i_ptr), static_cast<const void*>(&*i_ptr) );
84 }
const void * getBaseObjVoidPtr(T *p)
Return a const void* pointing to the base of an object.
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [36/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validator  ,
exceptionTests   
)

Definition at line 81 of file Validator_SerializationTest.cpp.

82 {
83  ValidatorXMLConverterDB::printKnownConverters(out);
84  out << std::endl;
85 
86  UNDEFINED_PARAMETERENTRY_VALIDATOR badValidator;
87  TEST_THROW(ValidatorXMLConverterDB::getConverter(badValidator), CantFindValidatorConverterException);
88 
89  TEST_THROW(RCP<ParameterList>
90  missingValidatorList = getParametersFromXmlFile("MissingValidator.xml"),
91  MissingValidatorDefinitionException);
92 
93  TEST_THROW(RCP<ParameterList>
94  missingPrototypeList = getParametersFromXmlFile("MissingPrototypeValidator.xml"),
95  MissingValidatorDefinitionException);
96 
97  TEST_THROW(RCP<ParameterList>
98  conflicitingValiIdsList = getParametersFromXmlFile("ConflictingValidatorIDs.xml"),
99  DuplicateValidatorIDsException);
100 
101  TEST_THROW(RCP<ParameterList>
102  stringValidatorBadTagList = getParametersFromXmlFile("StringValidatorBadTag.xml"),
103  BadTagException);
104 
105  TEST_THROW(RCP<ParameterList>
106  stringValidatorBadTagList = getParametersFromXmlFile("StringToIntegralValidatorBadTag.xml"),
107  BadTagException);
108 
109  #ifdef HAVE_TEUCHOS_DEBUG
110 
111  StringValidatorXMLConverter stringConverter;
112  AnyNumberValidatorXMLConverter anyNumberConverter;
113  ValidatortoIDMap writerDummyMap;
114  IDtoValidatorMap readerDummyMap;
115  RCP<AnyNumberParameterEntryValidator> anyNumberValidator =
117  writerDummyMap.insert(anyNumberValidator);
118  TEST_THROW(
119  stringConverter.fromValidatortoXML(anyNumberValidator, writerDummyMap),
120  BadValidatorXMLConverterException);
121  XMLObject anyNumberXML =
122  anyNumberConverter.fromValidatortoXML(anyNumberValidator, writerDummyMap);
123  TEST_THROW(
124  stringConverter.fromXMLtoValidator(anyNumberXML, readerDummyMap),
125  BadValidatorXMLConverterException);
126 
127  #endif
128 
129 }
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< AnyNumberParameterEntryValidator > anyNumberParameterEntryValidator()
Nonmember constructor AnyNumberParameterEntryValidator.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > getParametersFromXmlFile(const std::string &xmlFileName)
Reads XML parameters from a file and return them in a new parameter list.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [37/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ParameterList  ,
parameterEntryXMLConverters   
)

Definition at line 82 of file ParameterList_SerializationTest.cpp.

83 {
84  ParameterList myList;
85  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(int, 2);
86  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(unsigned int, 3);
87  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(short int, 4);
88  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(unsigned short int, 5);
89  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(long int, 6);
90  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(unsigned long int, 7);
91  #ifdef HAVE_TEUCHOS_LONG_LONG_INT
92  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(long long int, 8);
93  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(unsigned long long int, 9);
94  #endif //HAVE_TEUCHOS_LONG_LONG_INT
95  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(double, 10.0);
96  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(float, 11.0);
97 
98  ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(std::string, "hello");
99 
100  ADD_TYPE_PARAMETER(char, 'a');
101  ADD_TYPE_PARAMETER(bool, true);
102 
103  RCP<ParameterList> readInPL = writeThenReadPL(myList);
104 
105  out << "\nmyList:\n";
106  myList.print(out);
107  out << "\n*readInPL:\n";
108  readInPL->print(out);
109 
110  TEST_ASSERT(haveSameValues(myList, *readInPL));
111 }
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT bool haveSameValues(const ParameterList &list1, const ParameterList &list2)
Returns true if two parameter lists have the same values.
TEST_ASSERT(nonnull(readInCon))
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [38/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
default_construct   
)

Definition at line 82 of file FilteredIterator_UnitTests.cpp.

83 {
84  FilteredIterator<int*, SelectAll<int> > itr;
85  // There is just nothing that we can check for an uninitialized iterator!
86 }

◆ TEUCHOS_UNIT_TEST() [39/224]

Teuchos::TEUCHOS_UNIT_TEST ( GlobalMPISession  ,
basic   
)

Definition at line 83 of file GlobalMPISession_UnitTests.cpp.

83  {
84 #ifdef HAVE_MPI
85  TEST_ASSERT(GlobalMPISession::mpiIsInitialized());
86  int numProcs = -1;
87  ECHO(::MPI_Comm_size(MPI_COMM_WORLD, &numProcs));
88  TEST_EQUALITY(GlobalMPISession::getNProc(), numProcs);
89  int procRank = -1;
90  ECHO(::MPI_Comm_rank(MPI_COMM_WORLD, &procRank));
91  TEST_EQUALITY(GlobalMPISession::getRank(), procRank);
92 #else // HAVE_MPI
93  TEST_ASSERT(!GlobalMPISession::mpiIsInitialized());
94  TEST_EQUALITY_CONST(GlobalMPISession::getNProc(), 1);
95  TEST_EQUALITY_CONST(GlobalMPISession::getRank(), 0);
96 #endif // HAVE_MPI
97  TEST_ASSERT(!GlobalMPISession::mpiIsFinalized());
99 }
void globalReduceSuccess(bool &success, FancyOStream &out)
TEST_ASSERT(nonnull(readInCon))
int MPI_Comm_rank(int comm, int *rank)
Definition: mpic.c:56
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [40/224]

Teuchos::TEUCHOS_UNIT_TEST ( KeyObjectPair  ,
makeInvalid   
)

Definition at line 84 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

85 {
86  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
87  ECHO(SIOVOCB::KeyObjectPair<SIOVOCB::OrdinalIndex> kop =
88  SIOVOCB::KeyObjectPair<SIOVOCB::OrdinalIndex>::makeInvalid());
89  TEST_EQUALITY_CONST(kop.first, "");
90  TEST_EQUALITY_CONST(kop.second.idx, -1);
91  TEST_EQUALITY_CONST(kop.isActive(), false);
92 }

◆ TEUCHOS_UNIT_TEST() [41/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParameterListReader  ,
XMLDuplicatedSublistsThrowsError   
)

Definition at line 86 of file ParameterList_XMLDuplicateSublists.cpp.

87  {
88  FileInputSource xmlFile(filename);
89  XMLObject xmlParams = xmlFile.getObject();
90  XMLParameterListReader xmlPLReader;
91  TEST_EQUALITY_CONST( xmlPLReader.getAllowsDuplicateSublists(), true );
92  out << "Changing policy to disallow duplicate sublists" << std::endl;
93  xmlPLReader.setAllowsDuplicateSublists( false );
94  TEST_EQUALITY_CONST( xmlPLReader.getAllowsDuplicateSublists(), false );
95  TEST_THROW( xmlPLReader.toParameterList(xmlParams), DuplicateParameterSublist );
96  }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
const char * filename
Definition: ioapi.h:135
Definition: gkregex.c:113
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [42/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
NonconstInitialize   
)

Definition at line 87 of file ConstNonconstObjectContainer.cpp.

87  {
88  RCP<std::vector<double> > vec = rcp(new std::vector<double> );
89  ConstNonconstObjectContainer<std::vector<double> > vectorObj;
90  vectorObj.initialize(vec);
91  TEST_ASSERT( vectorObj.isConst() == false );
92  RCP<const std::vector<double> > vec2 = vectorObj.getConstObj();
93  TEST_ASSERT( vec == vec2 );
94  RCP<std::vector<double> > vec3 = vectorObj.getNonconstObj();
95  TEST_ASSERT( vec == vec3 );
96 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [43/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
construct   
)

Definition at line 89 of file FilteredIterator_UnitTests.cpp.

90 {
91  typedef Array<int>::iterator itr_t;
92  Array<int> a;
93  a.push_back(1);
94  FilteredIterator<itr_t,SelectAll<int> > itr(a.begin(), a.begin(), a.end());
95  TEST_ITER_EQUALITY(itr.current(), a.begin());
96  TEST_ITER_EQUALITY(itr.begin(), a.begin());
97  TEST_ITER_EQUALITY(itr.end(), a.end());
98  FilteredIterator<itr_t,SelectAll<int> > itr_end(a.end(), a.begin(), a.end());
99  TEST_ITER_EQUALITY(itr_end.current(), a.end());
100  TEST_ITER_EQUALITY(itr_end.begin(), a.begin());
101  TEST_ITER_EQUALITY(itr_end.end(), a.end());
102 }
struct a_s a
Definition: IpBlas.cpp:40
ArrayRCP< int > iterator
The type of a forward iterator.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [44/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_TwoDArrays  ,
stringFunctions   
)

Definition at line 91 of file TwoDArray_UnitTests.cpp.

91  {
92  TwoDArray<int> simpleArray = getSimpleTestTwoDArray();
93  std::string stringRep = TwoDArray<int>::toString(simpleArray);
94  TwoDArray<int> convertedArray = TwoDArray<int>::fromString(stringRep);
95  TEST_EQUALITY(simpleArray, convertedArray)
96 
97  std::string badStringRep = "4x4:{1.0,1.0}";
98  TEST_THROW(TwoDArray<int>::fromString(badStringRep),
99  InvalidArrayStringRepresentation)
100 }
TwoDArray< int > getSimpleTestTwoDArray()
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [45/224]

Teuchos::TEUCHOS_UNIT_TEST ( KeyObjectPair  ,
construct_set_isActive   
)

Definition at line 95 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

96 {
97  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
98  ECHO(SIOVOCB::KeyObjectPair<SIOVOCB::OrdinalIndex> kop("key_name2", 8, false));
99  TEST_EQUALITY_CONST(kop.first, "key_name2");
100  TEST_EQUALITY_CONST(kop.second.idx, 8);
101  TEST_EQUALITY_CONST(kop.isActive(), false);
102 }

◆ TEUCHOS_UNIT_TEST() [46/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParameterListReader  ,
XMLDuplicatedSublistsBackwardsCompatible   
)

Definition at line 98 of file ParameterList_XMLDuplicateSublists.cpp.

99  {
100  FileInputSource xmlFile(filename);
101  XMLObject xmlParams = xmlFile.getObject();
102  XMLParameterListReader xmlPLReader;
103  TEST_EQUALITY_CONST( xmlPLReader.getAllowsDuplicateSublists(), true );
104  TEST_NOTHROW( xmlPLReader.toParameterList(xmlParams) );
105  }
const char * filename
Definition: ioapi.h:135
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [47/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
ConstInitialize   
)

Definition at line 99 of file ConstNonconstObjectContainer.cpp.

99  {
100  RCP<const std::vector<double> > vec = rcp(new std::vector<double> );
101  ConstNonconstObjectContainer<std::vector<double> > vectorObj;
102  vectorObj.initialize(vec);
103  TEST_ASSERT( vectorObj.isConst() == true );
104  RCP<const std::vector<double> > vec2 = vectorObj.getConstObj();
105  TEST_ASSERT( vec == vec2 );
106  RCP<std::vector<double> > vec3;
107  TEST_THROW( vec3 = vectorObj.getNonconstObj(), NonconstAccessError );
108 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [48/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_TwoDArrays  ,
emptyTest   
)

Definition at line 102 of file TwoDArray_UnitTests.cpp.

102  {
103  TwoDArray<int> emptyArray;
104  TEST_EQUALITY_CONST(emptyArray.getNumRows(), 0)
105  TEST_EQUALITY_CONST(emptyArray.getNumCols(), 0)
106  TEST_EQUALITY_CONST(emptyArray.getDataArray().size(), 0)
107  TEST_ASSERT(emptyArray.isEmpty());
108 }
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [49/224]

Teuchos::TEUCHOS_UNIT_TEST ( GlobalMPISession  ,
barrier   
)

Definition at line 102 of file GlobalMPISession_UnitTests.cpp.

102  {
103  out << "*** Just make sure the basic barrier does not hang or something.\n";
104  ECHO(GlobalMPISession::barrier());
106 }
void globalReduceSuccess(bool &success, FancyOStream &out)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [50/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Functions  ,
MultiplicationTests   
)

Tests for multiplication functions

Definition at line 103 of file FunctionObject_Serialization_UnitTests.cpp.

103  {
104  RCP<MultiplicationFunction<int> > intTester = rcp(
105  new MultiplicationFunction<int>(10));
106 
107  XMLObject multiFuncXML = FunctionObjectXMLConverterDB::convertFunctionObject(
108  intTester);
109 
110  std::string type = multiFuncXML.getRequired(
111  FunctionObjectXMLConverter::getTypeAttributeName());
112  TEST_ASSERT(type == intTester->getTypeAttributeValue() );
113  int operand = multiFuncXML.getRequired<int>(
114  SimpleFunctionXMLConverter<int>::getOperandAttributeName());
115  TEST_ASSERT(operand == intTester->getModifiyingOperand());
116 
117  RCP<FunctionObject> readIn =
118  FunctionObjectXMLConverterDB::convertXML(multiFuncXML);
119  RCP<MultiplicationFunction<int> > readInCasted =
120  rcp_dynamic_cast<MultiplicationFunction<int> >(readIn);
121  TEST_ASSERT(readInCasted.get() != NULL);
122  TEST_ASSERT(
123  readInCasted->getModifiyingOperand()
124  ==
125  intTester->getModifiyingOperand());
126 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [51/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
deref   
)

Definition at line 105 of file FilteredIterator_UnitTests.cpp.

106 {
107  typedef Array<int>::iterator itr_t;
108  Array<int> a;
109  a.push_back(2);
110  FilteredIterator<itr_t,SelectAll<int> > itr(a.begin(), a.begin(), a.end());
111  TEST_EQUALITY_CONST(*itr, 2);
112 }
struct a_s a
Definition: IpBlas.cpp:40
ArrayRCP< int > iterator
The type of a forward iterator.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [52/224]

Teuchos::TEUCHOS_UNIT_TEST ( KeyObjectPair  ,
copyConstruct   
)

Definition at line 105 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

106 {
107  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
108  ECHO(SIOVOCB::KeyObjectPair<SIOVOCB::OrdinalIndex> kop1("key_name", 3, false));
109  ECHO(SIOVOCB::KeyObjectPair<SIOVOCB::OrdinalIndex> kop2(kop1));
110  TEST_EQUALITY_CONST(kop2.first, "key_name");
111  TEST_EQUALITY_CONST(kop2.second.idx, 3);
112  TEST_EQUALITY_CONST(kop2.isActive(), false);
113 }

◆ TEUCHOS_UNIT_TEST() [53/224]

Teuchos::TEUCHOS_UNIT_TEST ( GlobalMPISession  ,
sum   
)

Definition at line 109 of file GlobalMPISession_UnitTests.cpp.

109  {
110  ECHO(const int globalSum = GlobalMPISession::sum(GlobalMPISession::getRank()+1));
111  ECHO(const int n = GlobalMPISession::getNProc());
112  TEST_EQUALITY(globalSum, (n*(n+1))/2);
114 }
void globalReduceSuccess(bool &success, FancyOStream &out)
void ma57int * n
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [54/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_TwoDArrays  ,
streamTests   
)

Definition at line 110 of file TwoDArray_UnitTests.cpp.

110  {
111  TwoDArray<int> simpleArray = getSimpleTestTwoDArray();
112  std::stringstream ss;
113  ss << simpleArray;
114  TwoDArray<int> readArray;
115  std::istringstream instream(ss.str());
116  instream >> readArray;
117  TEST_EQUALITY(simpleArray, readArray);
118 }
TwoDArray< int > getSimpleTestTwoDArray()
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [55/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
AssignmentFromRCP   
)

Definition at line 111 of file ConstNonconstObjectContainer.cpp.

111  {
112  RCP<const std::vector<double> > vec = rcp(new std::vector<double> );
113  ConstNonconstObjectContainer<std::vector<double> > vectorObj;
114  vectorObj = vec;
115  TEST_ASSERT( vectorObj.isConst() == true );
116  RCP<const std::vector<double> > vec2 = vectorObj.getConstObj();
117  TEST_ASSERT( vec == vec2 );
118  RCP<std::vector<double> > vec3;
119  TEST_THROW( vec3 = vectorObj.getNonconstObj(), NonconstAccessError );
120 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [56/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ParameterList  ,
parameterEntryConverterExceptions   
)

Definition at line 113 of file ParameterList_SerializationTest.cpp.

114 {
115 
116  TEST_THROW(RCP<ParameterList>
117  badRootElementList = getParametersFromXmlFile("BadRootElement.xml"),
118  BadXMLParameterListRootElementException);
119 
120  TEST_THROW(RCP<ParameterList>
121  badParameterListElementList = getParametersFromXmlFile("BadParameterListElement.xml"),
122  BadParameterListElementException);
123 
124  TEST_THROW(RCP<ParameterList>
125  noNameAttributeList = getParametersFromXmlFile("NoNameAttribute.xml"),
126  NoNameAttributeExecption);
127 
128  TEST_THROW(RCP<ParameterList>
129  noTypeAttributeList = getParametersFromXmlFile("NoTypeAttribute.xml"),
130  NoTypeAttributeExecption);
131 
132  TEST_THROW(RCP<ParameterList>
133  noValueAttributeList = getParametersFromXmlFile("NoValueAttribute.xml"),
134  NoValueAttributeExecption);
135 
136  TEST_THROW(RCP<ParameterList>
137  badIdsList = getParametersFromXmlFile("DuplicateParameterIDs.xml"),
138  DuplicateParameterIDsException);
139 
140  TEST_THROW(RCP<ParameterList>
141  badParameterEntryConverterList = getParametersFromXmlFile("CantFindParameterEntryConverter.xml"),
142  CantFindParameterEntryConverterException);
143 
144 
145  #ifdef HAVE_TEUCHOS_DEBUG
146 
147  StandardTemplatedParameterConverter<int> intConverter;
148  StandardTemplatedParameterConverter<float> floatConverter;
149  ValidatortoIDMap dummmyValidatorMap;
150  RCP<ParameterEntry> floatParameter = rcp(
151  new ParameterEntry((float)3.0));
152  TEST_THROW(intConverter.fromParameterEntrytoXML(floatParameter, "blah", 1, dummmyValidatorMap),
153  BadParameterEntryXMLConverterTypeException);
154 
155  XMLObject floatXML = floatConverter.fromParameterEntrytoXML(floatParameter, "float", 1, dummmyValidatorMap);
156  TEST_THROW(intConverter.fromXMLtoParameterEntry(floatXML),
157  BadParameterEntryXMLConverterTypeException);
158 
159  #endif
160 
161 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > getParametersFromXmlFile(const std::string &xmlFileName)
Reads XML parameters from a file and return them in a new parameter list.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [57/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
member_access   
)

Definition at line 115 of file FilteredIterator_UnitTests.cpp.

116 {
117  typedef std::pair<int,int> value_t;
118  typedef Array<value_t>::iterator itr_t;
119  Array<value_t> a;
120  a.push_back(std::make_pair(2, 4));
121  FilteredIterator<itr_t,SelectAll<value_t> > itr(a.begin(), a.begin(), a.end());
122  TEST_EQUALITY_CONST(itr->first, 2);
123  TEST_EQUALITY_CONST(itr->second, 4);
124 }
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [58/224]

Teuchos::TEUCHOS_UNIT_TEST ( KeyObjectPair  ,
assign   
)

Definition at line 116 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

117 {
118  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
119  ECHO(SIOVOCB::KeyObjectPair<SIOVOCB::OrdinalIndex> kop1("key_name", 3, false));
120  ECHO(SIOVOCB::KeyObjectPair<SIOVOCB::OrdinalIndex> kop2);
121  TEST_EQUALITY_CONST(kop2.isActive(), true);
122  ECHO(kop2 = kop1);
123  TEST_EQUALITY_CONST(kop2.first, "key_name");
124  TEST_EQUALITY_CONST(kop2.second.idx, 3);
125  TEST_EQUALITY_CONST(kop2.isActive(), false);
126 }

◆ TEUCHOS_UNIT_TEST() [59/224]

Teuchos::TEUCHOS_UNIT_TEST ( GlobalMPISession  ,
allGather   
)

Definition at line 117 of file GlobalMPISession_UnitTests.cpp.

118 {
119  const int numProcs = GlobalMPISession::getNProc();
120  const int procRank = GlobalMPISession::getRank();
121  {
122  Array<int> allInts;
123  ECHO(allInts.resize(numProcs-1));
124  TEST_THROW(GlobalMPISession::allGather(procRank+1, allInts()), std::out_of_range);
125  ECHO(allInts.resize(numProcs+1));
126  TEST_THROW(GlobalMPISession::allGather(procRank+1, allInts()), std::out_of_range);
127  }
128  {
129  Array<int> allInts_expected(numProcs);
130  for (int k = 0; k < numProcs; ++k) {
131  allInts_expected[k] = k+1;
132  }
133  Array<int> allInts(numProcs);
134  ECHO(GlobalMPISession::allGather(procRank+1, allInts()));
135  TEST_EQUALITY(allInts, allInts_expected);
136  }
137 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
void char ipfint ipfint ipfint * k
Definition: IpBlas.cpp:44
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [60/224]

Teuchos::TEUCHOS_UNIT_TEST ( RCPNodeHandle  ,
assignSelf   
)

Definition at line 119 of file RCPNodeHandle_UnitTests.cpp.

120 {
121  RCPNodeHandle nodeRef;
122  nodeRef = nodeRef;
123 }

◆ TEUCHOS_UNIT_TEST() [61/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_TwoDArray  ,
clearTest   
)

Definition at line 120 of file TwoDArray_UnitTests.cpp.

120  {
121  TwoDArray<int> simpleArray = getSimpleTestTwoDArray();
122 
123  simpleArray.clear();
124  TEST_ASSERT(simpleArray.isEmpty());
125 }
TwoDArray< int > getSimpleTestTwoDArray()
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [62/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
uninitialize   
)

Definition at line 123 of file ConstNonconstObjectContainer.cpp.

123  {
124  RCP<const std::vector<double> > vec = rcp(new std::vector<double> );
125  ConstNonconstObjectContainer<std::vector<double> > vectorObj(vec);
126  TEST_ASSERT( vectorObj.isConst() == true );
127  RCP<const std::vector<double> > vec2 = vectorObj.getConstObj();
128  TEST_ASSERT( vec == vec2 );
129  vectorObj.uninitialize();
130  TEST_ASSERT( vectorObj.isConst() == true );
131  TEST_ASSERT( vectorObj.getConstObj() == null );
132 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [63/224]

Teuchos::TEUCHOS_UNIT_TEST ( RCPNodeHandle  ,
defaultConstruct   
)

Definition at line 126 of file RCPNodeHandle_UnitTests.cpp.

127 {
128  RCPNodeHandle nodeRef;
129  TEST_EQUALITY_CONST( nodeRef.count(), 0 );
130  TEST_EQUALITY_CONST( nodeRef.has_ownership(), false );
131  nodeRef.has_ownership(true);
132  TEST_EQUALITY_CONST( nodeRef.has_ownership(), false );
133 #ifdef TEUCHOS_DEBUG
134  TEST_EQUALITY_CONST( nodeRef.get_base_obj_map_key_void_ptr(), static_cast<void*>(0) );
135  TEST_THROW({nodeRef.set_extra_data(any(),"", PRE_DESTROY, true);},
136  NullReferenceError);
137  TEST_THROW({any &a = nodeRef.get_extra_data("int","blob"); (void)a;},
138  NullReferenceError);
139  TEST_THROW({const any &a = getConst(nodeRef).get_extra_data("int","blob"); (void)a;},
140  NullReferenceError);
141  TEST_THROW({any *a = nodeRef.get_optional_extra_data("int","blob"); (void)a;},
142  NullReferenceError);
143  TEST_THROW({const any *a = getConst(nodeRef).get_optional_extra_data("int","blob"); (void)a;},
144  NullReferenceError);
145 #endif // TEUCHOS_DEBUG
146 }
GC_API void(GC_CALLBACK *GC_same_obj_print_proc)(void *
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
struct a_s a
Definition: IpBlas.cpp:40
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [64/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
copy_construct_same   
)

Definition at line 127 of file FilteredIterator_UnitTests.cpp.

128 {
129  typedef Array<int>::iterator itr_t;
130  Array<int> a;
131  a.push_back(1);
132  FilteredIterator<itr_t,SelectAll<int> > itr1(a.begin(), a.begin(), a.end());
133  FilteredIterator<itr_t,SelectAll<int> > itr2(itr1);
134  TEST_ITER_EQUALITY(itr2.current(), a.begin());
135  TEST_ITER_EQUALITY(itr2.begin(), a.begin());
136  TEST_ITER_EQUALITY(itr2.end(), a.end());
137  TEST_EQUALITY(*itr1, *itr2);
138 }
struct a_s a
Definition: IpBlas.cpp:40
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
ArrayRCP< int > iterator
The type of a forward iterator.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [65/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_TwoDArray  ,
resizeTest   
)

Definition at line 127 of file TwoDArray_UnitTests.cpp.

127  {
128  TwoDArray<int> simpleArray = getSimpleTestTwoDArray();
129 
130  simpleArray.resizeRows(4);
131  TEST_EQUALITY_CONST(simpleArray.getNumRows(), 4);
132  TEST_EQUALITY_CONST(simpleArray.getNumCols(), 2);
133  TEST_EQUALITY_CONST(simpleArray(3,1), 0);
134  TEST_EQUALITY_CONST(simpleArray(1,1), 4);
135 
136  simpleArray.resizeRows(2);
137  TEST_EQUALITY_CONST(simpleArray.getNumRows(), 2);
138  TEST_EQUALITY_CONST(simpleArray.getNumCols(), 2);
139 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
140  TEST_THROW(simpleArray(3,1), RangeError);
141 #endif
142  TEST_EQUALITY_CONST(simpleArray(1,1), 4);
143 
144  simpleArray.resizeCols(4);
145  TEST_EQUALITY_CONST(simpleArray.getNumCols(), 4);
146  TEST_EQUALITY_CONST(simpleArray.getNumRows(), 2);
147  TEST_EQUALITY_CONST(simpleArray(1,3), 0);
148  TEST_EQUALITY_CONST(simpleArray(1,1), 4);
149 
150  simpleArray.resizeCols(2);
151  TEST_EQUALITY_CONST(simpleArray.getNumCols(), 2);
152  TEST_EQUALITY_CONST(simpleArray.getNumRows(), 2);
153 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
154  TEST_THROW(simpleArray(1,3), RangeError);
155 #endif
156  TEST_EQUALITY_CONST(simpleArray(1,1), 4);
157 
158 }
TwoDArray< int > getSimpleTestTwoDArray()
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [66/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Functions  ,
DivisionTests   
)

Tests for division functions

Definition at line 128 of file FunctionObject_Serialization_UnitTests.cpp.

128  {
129  RCP<DivisionFunction<int> > intTester = rcp(
130  new DivisionFunction<int>(10));
131 
132  XMLObject divisFuncXML = FunctionObjectXMLConverterDB::convertFunctionObject(
133  intTester);
134 
135  std::string type = divisFuncXML.getRequired(
136  FunctionObjectXMLConverter::getTypeAttributeName());
137  TEST_ASSERT(type == intTester->getTypeAttributeValue() );
138  int operand = divisFuncXML.getRequired<int>(
139  SimpleFunctionXMLConverter<int>::getOperandAttributeName());
140  TEST_ASSERT(operand == intTester->getModifiyingOperand());
141 
142  RCP<FunctionObject> readIn =
143  FunctionObjectXMLConverterDB::convertXML(divisFuncXML);
144  RCP<DivisionFunction<int> > readInCasted =
145  rcp_dynamic_cast<DivisionFunction<int> >(readIn);
146  TEST_ASSERT(readInCasted.get() != NULL);
147  TEST_ASSERT(
148  readInCasted->getModifiyingOperand()
149  ==
150  intTester->getModifiyingOperand());
151 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [67/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
defaultConstruct   
)

Definition at line 129 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

130 {
131  StringIndexedOrderedValueObjectContainer<int> oc;
132  TEST_EQUALITY_CONST(oc.numObjects(), 0);
133  TEST_EQUALITY_CONST(oc.numStorage(), 0);
134 }
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [68/224]

Teuchos::TEUCHOS_UNIT_TEST ( XMLParser  ,
simpleOrderedRead   
)

Definition at line 130 of file XMLParser_ordered.cpp.

131 {
132 
133  /* create a ParameterList object */
134  string xmlstring1;
135  ParameterList plGold("ParentList");
136  {
137  ParameterList c1("Z");
138  ParameterList c2("A");
139  c1.set("A", "first1");
140  c1.set("Z", "second1");
141  c2.set("Z", "first2");
142  c2.set("A", "second2");
143  plGold.set("9FirstSublist",c1);
144  plGold.set("1SecondSublist",c2);
145  }
146 
147  string xmlsrc(
148  "<ParameterList name=\"ParentList\">\n"
149  " <ParameterList name=\"9FirstSublist\">\n"
150  " <Parameter name=\"A\" type=\"string\" value=\"first1\"/>\n"
151  " <Parameter name=\"Z\" type=\"string\" value=\"second1\"/>\n"
152  " </ParameterList>\n"
153  " <ParameterList name=\"1SecondSublist\">\n"
154  " <Parameter name=\"Z\" type=\"string\" value=\"first2\"/>\n"
155  " <Parameter name=\"A\" type=\"string\" value=\"second2\"/>\n"
156  " </ParameterList>\n"
157  "</ParameterList>\n");
158  ParameterList plTest;
159  {
160  StringInputSource src(xmlsrc);
161  XMLParser parser(src.stream());
162  XMLObject xmlprob = parser.parse();
163  XMLParameterListReader pl2xml;
164  plTest = pl2xml.toParameterList(xmlprob);
165  }
166 
167  TEST_EQUALITY(plTest, plGold);
168 }
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [69/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validator  ,
fileNameValidatorConverter   
)

Definition at line 131 of file Validator_SerializationTest.cpp.

132 {
133  std::string defaultParameterName = "default";
134  std::string nonDefaultParameterName = "non default";
135 
136  RCP<FileNameValidator> defaultValidator =
137  rcp(new FileNameValidator);
138  RCP<FileNameValidator> nonDefaultValidator =
139  rcp(new FileNameValidator(true));
140  ParameterList myList("FileName Validator List");
141  myList.set("default", "", "parameter for default validator",
142  defaultValidator);
143  myList.set("non default", "blah.txt", "parameter for non default validator",
144  nonDefaultValidator);
145 
146  RCP<ParameterList> readInPL = writeThenReadPL(myList);
147 
148  RCP<const FileNameValidator> readinDefault =
149  rcp_dynamic_cast<const FileNameValidator>(
150  readInPL->getEntry(defaultParameterName).validator(), true);
151  TEST_EQUALITY(readinDefault->fileMustExist(), defaultValidator->fileMustExist());
152 
153  RCP<const FileNameValidator> readinNonDefault =
154  rcp_dynamic_cast<const FileNameValidator>(
155  readInPL->getEntry(nonDefaultParameterName).validator(), true);
156  TEST_EQUALITY(readinNonDefault->fileMustExist(), nonDefaultValidator->fileMustExist());
157 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [70/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Conditions  ,
testConditionGetterAndSetters   
)

Definition at line 134 of file Condition_UnitTests.cpp.

134  {
135  //Settin up initial list
136  RCP<ParameterList> testingList = rcp(new ParameterList("Condition Testing List"));
137 
138  Array<std::string> validValues(tuple<std::string>("mountain dew", "pepsi", "coke", "fanta"));
139  RCP<StringValidator> stringVali1 = rcp(new StringValidator(validValues));
140 
141  testingList->set("string param", "fanta", "parameter for testing string conditions", stringVali1);
142 
143  StringCondition::ValueList conValues1(tuple<std::string>("pepsi", "coke"));
144  RCP<StringCondition> stringCon1 = rcp( new StringCondition(testingList->getEntryRCP("string param"), conValues1));
145  Dependency::ConstParameterEntryList stringParameters = stringCon1->getAllParameters();
146  TEST_ASSERT(stringParameters.size() == 1);
147  TEST_ASSERT(stringParameters.find(testingList->getEntryRCP("string param")) != stringParameters.end());
148 
149  /*
150  * Testing for number condition
151  */
152  testingList->set("double param", 5.0, "parameter for testing number conditions");
153 
154  RCP<NumberCondition<double> > numberCon1 = rcp( new NumberCondition<double>(testingList->getEntryRCP("double param")));
155  Dependency::ConstParameterEntryList numberParameters = numberCon1->getAllParameters();
156  TEST_ASSERT(numberParameters.size() == 1);
157  TEST_ASSERT(numberParameters.find(testingList->getEntryRCP("double param")) != numberParameters.end());
158 
159  /*
160  * Testing bool conditions
161  */
162  testingList->set("bool param", true, "parameter for testing bool conditions");
163 
164  RCP<BoolCondition> boolCon1 = rcp( new BoolCondition(testingList->getEntryRCP("bool param")));
165  Dependency::ConstParameterEntryList boolParameters = boolCon1->getAllParameters();
166  TEST_ASSERT(boolParameters.size() == 1);
167  TEST_ASSERT(boolParameters.find(testingList->getEntryRCP("bool param")) != boolParameters.end());
168 
169  /*
170  * Test Not condition
171  */
172  RCP<NotCondition> notCon1 = rcp(new NotCondition(numberCon1));
173  Dependency::ConstParameterEntryList notParameters = notCon1->getAllParameters();
174  TEST_ASSERT(notParameters.size() == 1);
175  TEST_ASSERT(notParameters.find(testingList->getEntryRCP("double param")) != notParameters.end());
176 
177  /*
178  * Test And condition
179  */
180  Condition::ConstConditionList conList1(tuple<RCP<const Condition> >(stringCon1, boolCon1));
181  RCP<AndCondition> andCon1 = rcp(new AndCondition(conList1));
182  Dependency::ConstParameterEntryList andParameters = andCon1->getAllParameters();
183  TEST_ASSERT(andParameters.size() == 2);
184  TEST_ASSERT(andParameters.find(testingList->getEntryRCP("string param")) != andParameters.end());
185  TEST_ASSERT(andParameters.find(testingList->getEntryRCP("bool param")) != andParameters.end());
186 
187  /*
188  * Testing or condition
189  */
190  RCP<OrCondition> orCon1 = rcp(new OrCondition(conList1));
191  Dependency::ConstParameterEntryList orParameters = orCon1->getAllParameters();
192  TEST_ASSERT(orParameters.size() == 2);
193  TEST_ASSERT(orParameters.find(testingList->getEntryRCP("string param")) != orParameters.end());
194  TEST_ASSERT(orParameters.find(testingList->getEntryRCP("bool param")) != orParameters.end());
195 
196  /*
197  * Testing Equsl condition
198  */
199  Condition::ConstConditionList conList2(tuple<RCP<const Condition> >(numberCon1, boolCon1));
200  RCP<EqualsCondition> equalsCon1 = rcp(new EqualsCondition(conList2));
201  Dependency::ConstParameterEntryList equalsParameters = equalsCon1->getAllParameters();
202  TEST_ASSERT(equalsParameters.size() == 2);
203  TEST_ASSERT(equalsParameters.find(testingList->getEntryRCP("double param")) != equalsParameters.end());
204  TEST_ASSERT(equalsParameters.find(testingList->getEntryRCP("bool param")) != equalsParameters.end());
205 
206  /*
207  * Testing BoolLogicCondition add
208  */
209  equalsCon1->addCondition(orCon1);
210  Dependency::ConstParameterEntryList equalsParameters2 = equalsCon1->getAllParameters();
211  TEST_ASSERT(equalsParameters2.size() == 3);
212  TEST_ASSERT(equalsParameters2.find(testingList->getEntryRCP("string param")) != equalsParameters2.end());
213  TEST_ASSERT(equalsParameters2.find(testingList->getEntryRCP("double param")) != equalsParameters2.end());
214  TEST_ASSERT(equalsParameters2.find(testingList->getEntryRCP("bool param")) != equalsParameters2.end());
215 
216 }
Tuple< T, 1 > tuple(const T &a)
Create a Tuple<T,1>.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
RCP< BoolCondition > boolCon1
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [71/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
parens   
)

Definition at line 135 of file ConstNonconstObjectContainer.cpp.

135  {
136  ConstNonconstObjectContainer<std::vector<double> > vectorObj;
137  RCP<std::vector<double> > vec = rcp(new std::vector<double>);
138  vectorObj.initialize(vec);
139  RCP<const std::vector<double> > vec2 = vectorObj();
140  TEST_ASSERT( vec == vec2 );
141 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [72/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Conditions  ,
BoolConditionSerialization   
)

Definition at line 135 of file Condition_Serialization_UnitTests.cpp.

135  {
136  ConditionXMLConverterDB::printKnownConverters(out);
137  std::string paramName1 = "bool param";
138  std::string dependent1Name = "dependent1";
139  bool paramValue = true;
140  std::string dependentValue = "hi there!";
141  ParameterList testList("Condition Test List");
142  testList.set(paramName1, paramValue);
143  testList.set(dependent1Name, dependentValue);
144  RCP<BoolCondition> boolCon =
145  rcp(new BoolCondition(testList.getEntryRCP(paramName1)));
146 
147  RCP<ConditionVisualDependency> boolConDep =
148  rcp(new ConditionVisualDependency(
149  boolCon,
150  testList.getEntryRCP(dependent1Name)));
151 
152  RCP<DependencySheet> depSheet1 = rcp(new DependencySheet);
153  depSheet1->addDependency(boolConDep);
154 
155  RCP<DependencySheet> depSheetIn = rcp(new DependencySheet);
156  RCP<ParameterList> readinList =
157  writeThenReadPL(testList, depSheet1, depSheetIn);
158 
159  RCP<ParameterEntry> readInDependee1 = readinList->getEntryRCP(paramName1);
160 
161  RCP<ConditionVisualDependency> simpleReadInDep =
162  rcp_dynamic_cast<ConditionVisualDependency>(
163  *(depSheetIn->getDependenciesForParameter(readInDependee1)->begin()));
165  simpleReadInDep->getCondition()->getTypeAttributeValue(),
166  DummyObjectGetter<BoolCondition>::getDummyObject()->getTypeAttributeValue());
167  RCP<const BoolCondition> simpleReadInCon =
168  rcp_dynamic_cast<const BoolCondition>(simpleReadInDep->getCondition(), true);
169  TEST_ASSERT(nonnull(simpleReadInCon));
170 
171 }
RCP< DependencySheet > depSheet1
RCP< DependencySheet > depSheetIn
ParameterList testList("Condition Test List")
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
bool nonnull(const ArrayRCP< T > &p)
Returns true if p.get()!=NULL.
RCP< ParameterList > readinList
TEST_EQUALITY(readInDep1->getCondition() ->getTypeAttributeValue(), DummyObjectGetter< NotCondition >::getDummyObject() ->getTypeAttributeValue())
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
RCP< BoolCondition > boolCon
TEST_ASSERT(readInConList.size()==2)
RCP< ParameterEntry > readInDependee1
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [73/224]

Teuchos::TEUCHOS_UNIT_TEST ( TimeMonitor  ,
FUNC_TIME_MONITOR   
)

Definition at line 137 of file TimeMonitor_UnitTests.cpp.

138  {
140  using Teuchos::parameterList;
141  using Teuchos::RCP;
142 
143  func_time_monitor1 (); // Function to time.
144 
145  { // Repeat test for default output format.
146  std::ostringstream oss;
147  TimeMonitor::summarize (oss);
148 
149  // Echo summarize() output to the FancyOStream out (which is a
150  // standard unit test argument). Output should only appear in
151  // show-all-test-details mode.
152  out << oss.str () << std::endl;
153 
154  // Make sure that the timer's name shows up in the output.
155  const size_t substr_i = oss.str ().find ("FUNC_TIME_MONITOR1");
156  TEST_INEQUALITY(substr_i, std::string::npos);
157  }
158 
159  { // Repeat test for YAML output, compact style.
160  std::ostringstream oss;
161  RCP<ParameterList> reportParams =
162  parameterList (* (TimeMonitor::getValidReportParameters ()));
163  reportParams->set ("Report format", "YAML");
164  reportParams->set ("YAML style", "compact");
165  TimeMonitor::report (oss, reportParams);
166 
167  // Echo output to the FancyOStream out (which is a standard unit
168  // test argument). Output should only appear in "show all test
169  // details" mode.
170  out << oss.str () << std::endl;
171 
172  // Make sure that the timer's name shows up in the output.
173  const size_t substr_i = oss.str ().find ("FUNC_TIME_MONITOR1");
174  TEST_INEQUALITY(substr_i, std::string::npos);
175  }
176 
177  { // Repeat test for YAML output, spacious style.
178  std::ostringstream oss;
179  RCP<ParameterList> reportParams =
180  parameterList (* (TimeMonitor::getValidReportParameters ()));
181  reportParams->set ("Report format", "YAML");
182  reportParams->set ("YAML style", "spacious");
183  TimeMonitor::report (oss, reportParams);
184 
185  // Echo output to the FancyOStream out (which is a standard unit
186  // test argument). Output should only appear in "show all test
187  // details" mode.
188  out << oss.str () << std::endl;
189 
190  // Make sure that the timer's name shows up in the output.
191  const size_t substr_i = oss.str ().find ("FUNC_TIME_MONITOR1");
192  TEST_INEQUALITY(substr_i, std::string::npos);
193  }
194 
195  // This sets up for the next unit test.
196  TimeMonitor::clearCounters ();
197  }
void __VACALL report(lprec *lp, int level, char *format,...)
Definition: lp_report.c:55
A list of parameters of arbitrary type.
Smart reference counting pointer class for automatic garbage collection.
RCP< ParameterList > parameterList()
Nonmember constructor.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [74/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
basic_set_get   
)

Definition at line 137 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

138 {
139 
140  //typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB; // unused
141  //typedef SIOVOCB::Ordinal Ordinal;
142  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
143 
144  ECHO(const Ordinal my_int_1_idx1 = oc.setObj("my_int_1", 3));
145  TEST_EQUALITY_CONST(my_int_1_idx1, 0);
146  TEST_EQUALITY_CONST(oc.numObjects(), 1);
147  TEST_EQUALITY_CONST(oc.numStorage(), 1);
148  ECHO(const Ordinal my_int_1_idx2 = oc.getObjOrdinalIndex(("my_int_1")));
149  TEST_EQUALITY(my_int_1_idx2, my_int_1_idx2);
150  TEST_EQUALITY_CONST(*oc.getNonconstObjPtr(my_int_1_idx1), 3);
151  TEST_EQUALITY_CONST(*oc.getObjPtr(my_int_1_idx1), 3);
152  TEST_EQUALITY_CONST(*oc.getNonconstObjPtr("my_int_1"), 3);
153  TEST_EQUALITY_CONST(*oc.getObjPtr("my_int_1"), 3);
154 
155  ECHO(const Ordinal my_int_2_idx1 = oc.setObj("my_int_2", 4));
156  TEST_EQUALITY_CONST(my_int_2_idx1, 1);
157  TEST_EQUALITY_CONST(oc.numObjects(), 2);
158  TEST_EQUALITY_CONST(oc.numStorage(), 2);
159  ECHO(const Ordinal my_int_2_idx2 = oc.getObjOrdinalIndex(("my_int_2")));
160  TEST_EQUALITY(my_int_2_idx2, my_int_2_idx2);
161  TEST_EQUALITY_CONST(*oc.getNonconstObjPtr(my_int_2_idx1), 4);
162  TEST_EQUALITY_CONST(*oc.getObjPtr(my_int_2_idx1), 4);
163  TEST_EQUALITY_CONST(*oc.getNonconstObjPtr("my_int_2"), 4);
164  TEST_EQUALITY_CONST(*oc.getObjPtr("my_int_2"), 4);
165 
166 }
Teuchos_Ordinal Ordinal
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [75/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
copy_construct_different   
)

Definition at line 141 of file FilteredIterator_UnitTests.cpp.

142 {
143  typedef Array<int>::iterator itr_t;
144  typedef Array<int>::const_iterator citr_t;
145  Array<int> a;
146  a.push_back(1);
147  FilteredIterator<itr_t,SelectAll<int> > itr1(a.begin(), a.begin(), a.end());
148  FilteredIterator<citr_t,SelectAll<int> > itr2(itr1);
149  TEST_ITER_EQUALITY(itr2.current(), a.begin());
150  TEST_ITER_EQUALITY(itr2.begin(), a.begin());
151  TEST_ITER_EQUALITY(itr2.end(), a.end());
152  TEST_EQUALITY(*itr1, *itr2);
153 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
ArrayRCP< int > iterator
The type of a forward iterator.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [76/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
arrow   
)

Definition at line 145 of file ConstNonconstObjectContainer.cpp.

145  {
146  RCP<std::vector<double> > vec = rcp(new std::vector<double>);
147  vec->push_back(25.0);
148  vec->push_back(32.0);
149  ConstNonconstObjectContainer<std::vector<double> > vectorObj(vec);
150  TEST_ASSERT( vectorObj->size() == 2 );
151 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [77/224]

Teuchos::TEUCHOS_UNIT_TEST ( GlobalMPISession  ,
getArgv   
)

Definition at line 147 of file GlobalMPISession_UnitTests.cpp.

148 {
149  auto argvCopy = GlobalMPISession::getArgv ();
150  const auto numArgs = argvCopy.size ();
151  static_assert (std::is_integral<std::decay<decltype (numArgs)>::type>::value,
152  "The return type of getArgv has a size() method, "
153  "but it does not return an integer.");
154  if (numArgs > 0) {
155  // This tests that argvCopy has an operator[](int) const.
156  const auto arg0 = argvCopy[0];
157  static_assert (std::is_convertible<std::decay<decltype (arg0)>::type,
158  std::string>::value,
159  "The return type of getArgv must have an operator[](int) "
160  "that returns a type convertible to std::string.");
161  }
162 }
REAL value
Definition: lp_lib.h:932
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [78/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
SerializationTestMacros   
)

Definition at line 152 of file Dependencies_SerializationTests.cpp.

152  {
153  RCP<ParameterEntry> dependee1 = rcp(new ParameterEntry(true));
154  RCP<ParameterEntry> dependee2 = rcp(new ParameterEntry(true));
155  RCP<ParameterEntry> dependent1 = rcp(new ParameterEntry("blah"));
156  RCP<ParameterEntry> dependent2 = rcp(new ParameterEntry("blah"));
157  RCP<BoolVisualDependency> simpleDep =
158  rcp(new BoolVisualDependency(dependee1, dependent1));
159 
160 
161  Dependency::ParameterEntryList dependentList;
162  dependentList.insert(dependent1);
163  dependentList.insert(dependent2);
164 
165  RCP<BoolVisualDependency> complexDep =
166  rcp(new BoolVisualDependency(dependee2, dependentList));
167 
168  BASIC_DEPENDENCY_TEST(simpleDep, BoolVisualDependency, 1, 1);
169  VERIFY_DEPENDEE(simpleDep, dependee1);
170  VERIFY_DEPENDENT(simpleDep, dependent1);
171 
172  BASIC_DEPENDENCY_TEST(complexDep, BoolVisualDependency, 1, 2);
173  VERIFY_DEPENDEE(complexDep, dependee2);
174  VERIFY_DEPENDENT(complexDep, dependent1);
175  VERIFY_DEPENDENT(complexDep, dependent2);
176 
177 }
Dependency::ParameterEntryList dependentList
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
VERIFY_DEPENDEE(readinDep2, readinDependee3)
VERIFY_DEPENDENT(readinDep2, readinDependent1)
BASIC_DEPENDENCY_TEST(readinDep2, StringValidatorDependency, 1, 2)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [79/224]

Teuchos::TEUCHOS_UNIT_TEST ( RCPNodeHandle  ,
add_New_RCPNode_basic   
)

Definition at line 152 of file RCPNodeHandle_UnitTests.cpp.

153 {
154 
155  typedef RCPNodeTracer::RCPNodeStatistics RCPNodeStatistics;
156 
157  SET_RCPNODE_TRACING();
158 
159  RCPNode *node = basicRCPNode<A>(true);
160 
161  const int numActiveNodesBase = RCPNodeTracer::numActiveRCPNodes();
162  const RCPNodeStatistics rcpNodeStatisticsBefore = RCPNodeTracer::getRCPNodeStatistics();
163 
164  out << std::endl;
165  ECHO(RCPNodeTracer::addNewRCPNode(node, "dummy"));
166 
167  out << std::endl;
168  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+1);
169 
170  out << std::endl;
171  const RCPNodeStatistics rcpNodeStatistics1 = RCPNodeTracer::getRCPNodeStatistics();
172  TEST_COMPARE(rcpNodeStatistics1.maxNumRCPNodes, >=,
173  rcpNodeStatisticsBefore.maxNumRCPNodes);
174  TEST_EQUALITY(rcpNodeStatistics1.totalNumRCPNodeAllocations,
175  rcpNodeStatisticsBefore.totalNumRCPNodeAllocations+1);
176  TEST_EQUALITY(rcpNodeStatistics1.totalNumRCPNodeDeletions,
177  rcpNodeStatisticsBefore.totalNumRCPNodeDeletions);
178 
179  out << std::endl;
180  ECHO(RCPNodeTracer::removeRCPNode(node));
181 
182  out << std::endl;
183  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase);
184 
185  out << std::endl;
186  const RCPNodeStatistics rcpNodeStatistics2 = RCPNodeTracer::getRCPNodeStatistics();
187  TEST_COMPARE(rcpNodeStatistics2.maxNumRCPNodes, >=,
188  rcpNodeStatisticsBefore.maxNumRCPNodes);
189  TEST_EQUALITY(rcpNodeStatistics2.totalNumRCPNodeAllocations,
190  rcpNodeStatisticsBefore.totalNumRCPNodeAllocations+1);
191  TEST_EQUALITY(rcpNodeStatistics2.totalNumRCPNodeDeletions,
192  rcpNodeStatisticsBefore.totalNumRCPNodeDeletions+1);
193 
194  out << std::endl;
195  std::ostringstream statsOut_oss;
196  RCPNodeTracer::printRCPNodeStatistics(rcpNodeStatistics2, statsOut_oss);
197  std::ostringstream expectedStatsOut_oss;
198  expectedStatsOut_oss
199  << "\n***"
200  << "\n*** RCPNode Tracing statistics:"
201  << "\n**\n"
202  << "\n maxNumRCPNodes = "<<rcpNodeStatistics2.maxNumRCPNodes
203  << "\n totalNumRCPNodeAllocations = "<<rcpNodeStatistics2.totalNumRCPNodeAllocations
204  << "\n totalNumRCPNodeDeletions = "<<rcpNodeStatistics2.totalNumRCPNodeDeletions
205  << "\n";
206  TEST_EQUALITY(statsOut_oss.str(), expectedStatsOut_oss.str());
207 
208  deleteRCPNode(&node);
209 
210 }
void deleteRCPNode(RCPNode **node)
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [80/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
arrowEmpty   
)

Definition at line 154 of file ConstNonconstObjectContainer.cpp.

154  {
155  ConstNonconstObjectContainer<std::vector<double> > vectorObj;
156 #ifdef TEUCHOS_DEBUG
157  TEST_THROW( vectorObj->size(), NullReferenceError );
158 #endif
159 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [81/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
construct_default   
)

Definition at line 155 of file ParameterList_UnitTests.cpp.

156 {
157  ParameterList pl;
158  TEST_EQUALITY_CONST(pl.name(), "ANONYMOUS");
159  TEST_EQUALITY_CONST(pl.numParams(), 0);
160 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [82/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
assign_same   
)

Definition at line 156 of file FilteredIterator_UnitTests.cpp.

157 {
158  typedef Array<int>::iterator itr_t;
159  Array<int> a;
160  a.push_back(1);
161  FilteredIterator<itr_t,SelectAll<int> > itr1(a.begin(), a.begin(), a.end());
162  FilteredIterator<itr_t,SelectAll<int> > itr2;
163  itr2 = itr1;
164  TEST_ITER_EQUALITY(itr2.current(), a.begin());
165  TEST_ITER_EQUALITY(itr2.begin(), a.begin());
166  TEST_ITER_EQUALITY(itr2.end(), a.end());
167  TEST_EQUALITY(*itr1, *itr2);
168 }
struct a_s a
Definition: IpBlas.cpp:40
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
ArrayRCP< int > iterator
The type of a forward iterator.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [83/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validator  ,
stringValidatorConverter   
)

Definition at line 160 of file Validator_SerializationTest.cpp.

161 {
162  std::string defaultParameterName = "default";
163  std::string nonDefaultParameterName = "non default";
164 
165  RCP<StringValidator> nonDefaultValidator = rcp(
166  new StringValidator(tuple<std::string>("value1", "cheese", "kurtis", "is", "awesome")));
167  ParameterList myList("String Validator List");
168  myList.set("non default", "kurtis", "parameter for non default validator",
169  nonDefaultValidator);
170 
171  RCP<ParameterList> readInPL = writeThenReadPL(myList);
172 
173  RCP<const StringValidator> readinNonDefault =
174  rcp_dynamic_cast<const StringValidator>(
175  readInPL->getEntry(nonDefaultParameterName).validator(), true);
176  TEST_COMPARE_ARRAYS(*(readinNonDefault->validStringValues()),
177  *(nonDefaultValidator->validStringValues()));
178 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [84/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_TwoDArray  ,
symmetryTest   
)

Definition at line 160 of file TwoDArray_UnitTests.cpp.

160  {
161  TwoDArray<int> simpleArray = getSimpleTestTwoDArray();
162  TEST_ASSERT(!simpleArray.isSymmetrical());
163  simpleArray.setSymmetrical(true);
164  TEST_ASSERT(simpleArray.isSymmetrical());
165 
166 }
TwoDArray< int > getSimpleTestTwoDArray()
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [85/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
dereference   
)

Definition at line 163 of file ConstNonconstObjectContainer.cpp.

163  {
164  RCP<std::vector<double> > vec = rcp(new std::vector<double>);
165  vec->push_back(25.0);
166  vec->push_back(32.0);
167  ConstNonconstObjectContainer<std::vector<double> > vectorObj(vec);
168  TEST_ASSERT( (*vectorObj)[0] == 25.0 );
169  TEST_ASSERT( (*vectorObj)[1] == 32.0 );
170 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [86/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
construct_withName   
)

Definition at line 163 of file ParameterList_UnitTests.cpp.

164 {
165  ParameterList pl("someName");
166  TEST_EQUALITY_CONST(pl.name(), "someName");
167  TEST_EQUALITY_CONST(pl.numParams(), 0);
168 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [87/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_TwoDArray  ,
symmetrySerialization   
)

Definition at line 168 of file TwoDArray_UnitTests.cpp.

168  {
169  TwoDArray<int> simpleArray = getSimpleTestTwoDArray();
170  simpleArray.setSymmetrical(true);
171  std::string arrayString = TwoDArray<int>::toString(simpleArray);
172  TwoDArray<int> readIn = TwoDArray<int>::fromString(arrayString);
173  TEST_ASSERT(readIn.isSymmetrical());
174 }
TwoDArray< int > getSimpleTestTwoDArray()
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [88/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
set_two_keep_ref   
)

Definition at line 169 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

170 {
171  // Test test makes sure that objects keep the same address when adding new
172  // objects.
173  //typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB; // unused
174  //typedef SIOVOCB::Ordinal Ordinal;
175  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
176  ECHO(const Ordinal my_int_1_idx = oc.setObj("my_int_1", 3));
177  ECHO(const int &my_int_1 = *oc.getObjPtr(my_int_1_idx));
178  ECHO(oc.setObj("my_int_2", 4));
179  TEST_EQUALITY_CONST(*oc.getObjPtr(my_int_1_idx), 3);
180  TEST_EQUALITY(&my_int_1, oc.getObjPtr(my_int_1_idx).get());
181  TEST_EQUALITY_CONST(my_int_1, 3);
182 }
Teuchos_Ordinal Ordinal
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [89/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
assign_different   
)

Definition at line 171 of file FilteredIterator_UnitTests.cpp.

172 {
173  typedef Array<int>::iterator itr_t;
174  typedef Array<int>::const_iterator citr_t;
175  Array<int> a;
176  a.push_back(1);
177  FilteredIterator<itr_t,SelectAll<int> > itr1(a.begin(), a.begin(), a.end());
178  FilteredIterator<citr_t,SelectAll<int> > itr2;
179  itr2 = itr1;
180  TEST_ITER_EQUALITY(itr2.current(), a.begin());
181  TEST_ITER_EQUALITY(itr2.begin(), a.begin());
182  TEST_ITER_EQUALITY(itr2.end(), a.end());
183  TEST_EQUALITY(*itr1, *itr2);
184 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
ArrayRCP< int > iterator
The type of a forward iterator.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [90/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
createParameterList_empty   
)

Definition at line 171 of file ParameterList_UnitTests.cpp.

172 {
173  RCP<ParameterList> pl = createParameterList();
174  TEST_ASSERT(nonnull(pl));
175  TEST_EQUALITY_CONST(pl->name(), "ANONYMOUS");
176 }
RCP< ParameterList > createParameterList()
Nonmember constructor.
bool nonnull(const ArrayRCP< T > &p)
Returns true if p.get()!=NULL.
TEST_ASSERT(nonnull(readInCon))
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [91/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
dereferenceEmpty   
)

Definition at line 173 of file ConstNonconstObjectContainer.cpp.

173  {
174  ConstNonconstObjectContainer<std::vector<double> > vectorObj;
175 #ifdef TEUCHOS_DEBUG
176  TEST_THROW( (*vectorObj).size(), NullReferenceError );
177 #endif
178 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [92/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
constructor   
)

Definition at line 173 of file ObjectBuilder_UnitTests.cpp.

173  {
174  RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>();
175  TEST_EQUALITY_CONST( ob->getObjectName(), "None" );
176  TEST_EQUALITY_CONST( ob->create(), null );
177  RCP<const ParameterList> pl;
178  TEST_NOTHROW( pl = ob->getValidParameters() );
179  TEST_EQUALITY_CONST( pl->get<std::string>("Object Type"), "None" );
180  TEST_NOTHROW( ob = null );
181 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59

◆ TEUCHOS_UNIT_TEST() [93/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
createParameterList_withName   
)

Definition at line 179 of file ParameterList_UnitTests.cpp.

180 {
181  RCP<ParameterList> pl = createParameterList("dummyName");
182  TEST_ASSERT(nonnull(pl));
183  TEST_EQUALITY_CONST(pl->name(), "dummyName");
184 }
RCP< ParameterList > createParameterList()
Nonmember constructor.
bool nonnull(const ArrayRCP< T > &p)
Returns true if p.get()!=NULL.
TEST_ASSERT(nonnull(readInCon))
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [94/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
StringVisualDepSerialization   
)

Definition at line 180 of file Dependencies_SerializationTests.cpp.

180  {
181  std::string dependee1 = "string param";
182  std::string dependee2 = "string param2";
183  std::string dependent1 = "dependent param1";
184  std::string dependent2 = "dependent param2";
185  ParameterList myDepList("String Visual Dep List");
186  RCP<DependencySheet> myDepSheet = rcp(new DependencySheet);
187  myDepList.set(dependee1, "val1");
188  myDepList.set(dependee2, "val2");
189  myDepList.set(dependent1, 1.0);
190  myDepList.set(dependent2, 1.0);
191 
192  StringVisualDependency::ValueList valList1 = tuple<std::string>("val1");
193 
194  RCP<StringVisualDependency> basicStringVisDep = rcp(
195  new StringVisualDependency(
196  myDepList.getEntryRCP(dependee1),
197  myDepList.getEntryRCP(dependent1),
198  valList1));
199 
200  Dependency::ParameterEntryList dependentList;
201  dependentList.insert(myDepList.getEntryRCP(dependent1));
202  dependentList.insert(myDepList.getEntryRCP(dependent2));
203  StringVisualDependency::ValueList valList2 =
204  tuple<std::string>("val1", "val2");
205 
206  RCP<StringVisualDependency> complexStringVisDep = rcp(
207  new StringVisualDependency(
208  myDepList.getEntryRCP(dependee2),
210  valList2,
211  false));
212 
213  myDepSheet->addDependency(basicStringVisDep);
214  myDepSheet->addDependency(complexStringVisDep);
215 
216  RCP<DependencySheet> readInDepSheet = rcp(new DependencySheet);
217 
218  XMLParameterListWriter plWriter;
219  XMLObject xmlOut = plWriter.toXML(myDepList, myDepSheet);
220  out << xmlOut.toString();
221 
222  RCP<ParameterList> readInList =
223  writeThenReadPL(myDepList, myDepSheet, readInDepSheet);
224 
225  RCP<ParameterEntry> readinDependee1 = readInList->getEntryRCP(dependee1);
226  RCP<ParameterEntry> readinDependent1 = readInList->getEntryRCP(dependent1);
227  RCP<ParameterEntry> readinDependee2 = readInList->getEntryRCP(dependee2);
228  RCP<ParameterEntry> readinDependent2 = readInList->getEntryRCP(dependent2);
229 
230  RCP<Dependency> readinDep1 =
231  *(readInDepSheet->getDependenciesForParameter(readinDependee1)->begin());
232 
233  RCP<Dependency> readinDep2 =
234  *(readInDepSheet->getDependenciesForParameter(readinDependee2)->begin());
235 
236  BASIC_DEPENDENCY_TEST(readinDep1, StringVisualDependency, 1, 1);
237  VERIFY_DEPENDEE(readinDep1, readinDependee1);
238  VERIFY_DEPENDENT(readinDep1, readinDependent1);
239 
240  BASIC_DEPENDENCY_TEST(readinDep2, StringVisualDependency, 1, 2);
241  VERIFY_DEPENDEE(readinDep2, readinDependee2);
242  VERIFY_DEPENDENT(readinDep2, readinDependent1);
243  VERIFY_DEPENDENT(readinDep2, readinDependent2);
244 
245  RCP<StringVisualDependency> castedDep1 =
246  rcp_dynamic_cast<StringVisualDependency>(readinDep1, true);
247  RCP<StringVisualDependency> castedDep2 =
248  rcp_dynamic_cast<StringVisualDependency>(readinDep2, true);
249 
250  TEST_COMPARE_ARRAYS(
251  castedDep1->getValues(), basicStringVisDep->getValues());
252  TEST_COMPARE_ARRAYS(
253  castedDep2->getValues(), complexStringVisDep->getValues());
254 
255  TEST_EQUALITY(castedDep1->getShowIf(), basicStringVisDep->getShowIf());
256  TEST_EQUALITY(castedDep2->getShowIf(), complexStringVisDep->getShowIf());
257 }
Dependency::ParameterEntryList dependentList
RCP< ParameterEntry > readinDependent2
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
TEST_EQUALITY(rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep2->getDefaultValidator(), true) ->getMax(), defaultVali->getMax())
RCP< ParameterEntry > readinDependee1
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
RCP< ParameterEntry > readinDependent1
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
VERIFY_DEPENDEE(readinDep2, readinDependee3)
RCP< ConditionVisualDependency > castedDep2
RCP< DependencySheet > myDepSheet
VERIFY_DEPENDENT(readinDep2, readinDependent1)
RCP< ConditionVisualDependency > castedDep1
RCP< Dependency > readinDep1
RCP< DependencySheet > readInDepSheet
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
ParameterList myDepList("String Vali Dep List")
RCP< Dependency > readinDep2
BASIC_DEPENDENCY_TEST(readinDep2, StringValidatorDependency, 1, 2)
out<< xmlOut.toString();RCP< ParameterList > readInList
RCP< ParameterEntry > readinDependee2
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
XMLParameterListWriter plWriter
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [95/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validator  ,
boolValidatorConverter   
)

Definition at line 181 of file Validator_SerializationTest.cpp.

182 {
183  std::string xmlFileName = "BoolValidatorList.xml";
184  std::string boolParameterName = "boolParameterName";
185  RCP<BoolParameterEntryValidator> boolValidator =
186  rcp(new BoolParameterEntryValidator());
187 
188  ParameterList myList("BoolValidatorList");
189  myList.set(boolParameterName, false,
190  "A parameter with a BoolParameterEntryValidator validator.",
191  boolValidator);
192 
193  RCP<ParameterList> readInPL = writeThenReadPL(myList);
194 
195  RCP<const BoolParameterEntryValidator> readInBoolValidator =
196  rcp_dynamic_cast<const BoolParameterEntryValidator>(
197  readInPL->getEntry(boolParameterName).validator(), true);
198 
199  // to do - check any stuff we want to check
200  // right now it doesn't have any settings
201 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [96/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
castToRCP   
)

Definition at line 184 of file ConstNonconstObjectContainer.cpp.

184  {
185  RCP<std::vector<double> > vec = rcp(new std::vector<double>);
186  ConstNonconstObjectContainer<std::vector<double> > vectorObj(vec);
187  RCP<const std::vector<double> > vec2(vectorObj);
188  TEST_ASSERT( vec == vec2 );
189 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [97/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
getObjOrdinalIndex   
)

Definition at line 185 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

186 {
187 
188  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
189  //typedef SIOVOCB::Ordinal Ordinal;
190  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
191  ECHO(oc.setObj("my_int_1", 3));
192  TEST_EQUALITY_CONST(oc.getObjOrdinalIndex("my_int_1"), 0);
193  ECHO(oc.setObj("my_int_2", 3));
194  TEST_EQUALITY_CONST(oc.getObjOrdinalIndex("my_int_2"), 1);
195  TEST_EQUALITY_CONST(oc.getObjOrdinalIndex("does_not_exist"), SIOVOCB::getInvalidOrdinal());
196 }
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [98/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
setNames   
)

Definition at line 185 of file ObjectBuilder_UnitTests.cpp.

185  {
186  {
187  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>();
188  TEST_THROW( ob->setObjectName(""), std::logic_error );
189  TEST_THROW( ob->setObjectTypeName(""), std::logic_error );
190  }
191  {
192  RCP<ObjectBuilder<Foo> > ob;
193  TEST_THROW( ob = objectBuilder<Foo>("","Foo Type"), std::logic_error );
194  TEST_THROW( ob = objectBuilder<Foo>("Foo",""), std::logic_error );
195  TEST_THROW( ob = objectBuilder<Foo>("",""), std::logic_error );
196  }
197  {
198  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>();
199  ob->setObjectName("Foo");
200  ob->setObjectTypeName("Foo Type");
201  const RCP<const ParameterList> validpl = ob->getValidParameters();
202  // Now we check that the parameterlist is correct
203  TEST_EQUALITY_CONST( validpl->get<std::string>("Foo Type"), "None" );
204  const ParameterEntry pe = validpl->getEntry("Foo Type");
205  TEST_EQUALITY_CONST( pe.docString(),
206  "Determines the type of Foo object that will be built.\nThe parameters for each Foo Type are specified in this sublist"
207  );
208  }
209  {
210  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>("Foo","Foo Type");
211  const RCP<const ParameterList> validpl = ob->getValidParameters();
212  // Now we check that the parameterlist is correct
213  TEST_EQUALITY_CONST( validpl->get<std::string>("Foo Type"), "None" );
214  const ParameterEntry pe = validpl->getEntry("Foo Type");
215  TEST_EQUALITY_CONST( pe.docString(),
216  "Determines the type of Foo object that will be built.\nThe parameters for each Foo Type are specified in this sublist"
217  );
218  }
219 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [99/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
set_get_int   
)

Definition at line 187 of file ParameterList_UnitTests.cpp.

188 {
189  ParameterList pl;
190 
191  out << "\n";
192  ECHO(pl.set("my int", 3));
193 
194  out << "\n";
195  ECHO(const ParameterEntry& my_int_c_param = getConst(pl).getEntry("my int"));
196  TEST_EQUALITY_CONST(my_int_c_param.isUsed(), false);
197  TEST_EQUALITY_CONST(my_int_c_param.isList(), false);
198  TEST_EQUALITY_CONST(my_int_c_param.isDefault(), false);
199  TEST_EQUALITY_CONST(my_int_c_param.docString(), "");
200  TEST_ASSERT(is_null(my_int_c_param.validator()));
201  TEST_EQUALITY_CONST(getValue<int>(my_int_c_param), 3);
202  ECHO(const bool param_isType_int1 = my_int_c_param.isType<int>());
203  TEST_EQUALITY_CONST(param_isType_int1, true);
204  ECHO(const bool param_isType_double1 = my_int_c_param.isType<double>());
205  TEST_EQUALITY_CONST(param_isType_double1, false);
206 
207  out << "\n";
208  ECHO(const ParameterEntry& my_int_param = pl.getEntry("my int"));
209  TEST_EQUALITY_CONST(my_int_param.isUsed(), true);
210 
211  out << "\n";
212  ECHO(const int my_int = pl.get<int>("my int"));
213  TEST_EQUALITY_CONST(my_int, 3);
214 
215 }
TEST_ASSERT(nonnull(readInCon))
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [100/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
equality_operators_same   
)

Definition at line 187 of file FilteredIterator_UnitTests.cpp.

188 {
189  typedef Array<int>::iterator itr_t;
190  Array<int> a;
191  a.push_back(1);
192  FilteredIterator<itr_t,SelectAll<int> > itr1(a.begin(), a.begin(), a.end());
193  FilteredIterator<itr_t,SelectAll<int> > itr2(itr1);
194  TEST_EQUALITY_CONST(itr2 == itr1, true);
195  TEST_EQUALITY_CONST(itr2 != itr1, false);
196 }
struct a_s a
Definition: IpBlas.cpp:40
ArrayRCP< int > iterator
The type of a forward iterator.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [101/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
castFromRCP   
)

Definition at line 197 of file ConstNonconstObjectContainer.cpp.

197  {
198  RCP<std::vector<double> > vec = rcp(new std::vector<double>);
199  ConstNonconstObjectContainer<std::vector<double> > vectorObj(vec);
200  TEST_ASSERT( vectorObj.getConstObj() == vec );
201 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [102/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
equality_operators_different   
)

Definition at line 199 of file FilteredIterator_UnitTests.cpp.

200 {
201  typedef Array<int>::iterator itr_t;
202  Array<int> a;
203  a.push_back(1);
204  FilteredIterator<itr_t,SelectAll<int> > itr1(a.begin(), a.begin(), a.end());
205  FilteredIterator<itr_t,SelectAll<int> > itr2(a.end(), a.begin(), a.end());
206  TEST_EQUALITY_CONST(itr2 == itr1, false);
207  TEST_EQUALITY_CONST(itr2 != itr1, true);
208 }
struct a_s a
Definition: IpBlas.cpp:40
ArrayRCP< int > iterator
The type of a forward iterator.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [103/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
set_and_set_again   
)

Definition at line 199 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

200 {
201 
202  //typedef StringIndexedOrderedValueObjectContainerBase::Ordinal Ordinal;
203  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
204 
205  ECHO(const Ordinal my_int_1_idx1 = oc.setObj("my_int_1", 3));
206  TEST_EQUALITY_CONST(my_int_1_idx1, 0);
207  ECHO(const Ordinal my_int_1_idx2 = oc.getObjOrdinalIndex(("my_int_1")));
208  TEST_EQUALITY_CONST(my_int_1_idx2, my_int_1_idx1);
209  TEST_EQUALITY_CONST(*oc.getNonconstObjPtr("my_int_1"), 3);
210 
211  ECHO(const Ordinal my_int_1_idx3 = oc.setObj("my_int_1", 4));
212  TEST_EQUALITY_CONST(my_int_1_idx3, 0);
213  ECHO(const Ordinal my_int_1_idx4 = oc.getObjOrdinalIndex(("my_int_1")));
214  TEST_EQUALITY_CONST(my_int_1_idx3, my_int_1_idx4);
215  TEST_EQUALITY_CONST(*oc.getNonconstObjPtr("my_int_1"), 4);
216 
217 }
Teuchos_Ordinal Ordinal
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [104/224]

Teuchos::TEUCHOS_UNIT_TEST ( TimeMonitor  ,
enableTimer   
)

Definition at line 202 of file TimeMonitor_UnitTests.cpp.

203  {
204  using Teuchos::Array;
205  using Teuchos::OSTab;
207  using Teuchos::parameterList;
208  using Teuchos::RCP;
209  using Teuchos::rcpFromRef;
210  using Teuchos::Time;
211  using Teuchos::TimeMonitor;
212  using std::endl;
213  typedef Teuchos::Array<RCP<Time> >::size_type size_type;
214 
215  out << "Testing TimeMonitor's disableTimer() and enableTimer() methods"
216  << endl;
217  OSTab (rcpFromRef (out));
218 
219  out << "Creating timers" << endl;
220  const int numTrials = 5;
221  const int numTimers = 3;
222  Array<RCP<Time> > timers (numTimers);
223  for (size_type i = 0; i < numTimers; ++i) {
224  std::ostringstream os; // construct timer name
225  os << "Timer " << i;
226  timers[i] = TimeMonitor::getNewTimer (os.str ());
227  }
228 
229  out << "Running all timers without disabling any" << endl;
230  // The actual number of operations in slowloop is proportional to
231  // the cube of the loop length. Adjust loopLength as necessary to
232  // ensure the timer reports a nonzero elapsed time for each of the
233  // invocations.
234  const size_t loopLength = 25;
235  for (int k = 0; k < numTrials; ++k) {
236  for (size_type i = 0; i < numTimers; ++i) {
237  TimeMonitor timeMon (* timers[i]);
238  slowLoop (loopLength);
239  }
240  }
241  for (size_type i = 0; i < numTimers; ++i) {
242  TEST_EQUALITY( timers[i]->numCalls(), numTrials );
243  }
244 
245  out << "Disabling one timer and trying again" << endl;
246  // Disable timers[0] only, and repeat the above loops.
247  TEST_NOTHROW( TimeMonitor::disableTimer ("Timer 0") );
248  for (int k = 0; k < numTrials; ++k) {
249  for (size_type i = 0; i < numTimers; ++i) {
250  TimeMonitor timeMon (* timers[i]);
251  slowLoop (loopLength);
252  }
253  }
254  TEST_EQUALITY( timers[0]->numCalls(), numTrials );
255  for (size_type i = 1; i < numTimers; ++i) {
256  TEST_EQUALITY( timers[i]->numCalls(), 2*numTrials );
257  }
258 
259  out << "Reenabling the timer and trying again" << endl;
260  // Enable timers[0] and repeat the above loops.
261  TEST_NOTHROW( TimeMonitor::enableTimer ("Timer 0") );
262  for (int k = 0; k < numTrials; ++k) {
263  for (size_type i = 0; i < numTimers; ++i) {
264  TimeMonitor timeMon (* timers[i]);
265  slowLoop (loopLength);
266  }
267  }
268  TEST_EQUALITY( timers[0]->numCalls(), 2*numTrials );
269  for (size_type i = 1; i < numTimers; ++i) {
270  TEST_EQUALITY( timers[i]->numCalls(), 3*numTrials );
271  }
272 
273  out << "Test that summarize() reports enabled and disabled timers" << endl;
274  // Make sure that summarize() reports all timers. Disabling a
275  // timer must _not_ exclude it from the list of timers printed by
276  // summarize(). Disable a different timer this time just for fun.
277  TEST_NOTHROW( TimeMonitor::disableTimer ("Timer 1") );
278  {
279  std::ostringstream oss;
280  TimeMonitor::summarize (oss);
281 
282  // Echo summarize() output to the FancyOStream out (which is a
283  // standard unit test argument). Output should only appear in
284  // show-all-test-details mode.
285  out << oss.str () << std::endl;
286 
287  // Make sure that each timer's name shows up in the output.
288  for (size_type i = 0; i < numTimers; ++i) {
289  const std::string name = timers[i]->name ();
290  const size_t substr_i = oss.str ().find (name);
291  TEST_INEQUALITY(substr_i, std::string::npos);
292  }
293  }
294 
295  // This sets up for the next unit test.
296  TimeMonitor::clearCounters ();
297  }
Wall-clock timer.
A list of parameters of arbitrary type.
Smart reference counting pointer class for automatic garbage collection.
basic_OSTab< char > OSTab
A scope-safe timer wrapper class, that can compute global timer statistics.
char * name
Definition: lp_lib.h:823
void char ipfint ipfint ipfint * k
Definition: IpBlas.cpp:44
int i
Definition: parse.c:193
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
RCP< T > rcpFromRef(T &r)
Return a non-owning weak RCP object from a raw object reference for a defined type.
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...

◆ TEUCHOS_UNIT_TEST() [105/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validator  ,
anynumberValidatorConverter   
)

Definition at line 203 of file Validator_SerializationTest.cpp.

204 {
205  std::string xmlFileName = "AnyNumberValidatorList.xml";
206  std::string defaultParameterName = "default";
207  std::string nonDefaultParameterName = "preferred and accepted";
208  RCP<AnyNumberParameterEntryValidator> defaultValidator =
209  rcp(new AnyNumberParameterEntryValidator());
210  AnyNumberParameterEntryValidator::AcceptedTypes acceptedTypes;
211  acceptedTypes.allowDouble(false);
212  RCP<AnyNumberParameterEntryValidator> nonDefaultValidator =
213  rcp(
214  new AnyNumberParameterEntryValidator(
215  AnyNumberParameterEntryValidator::PREFER_INT,
216  acceptedTypes
217  )
218  );
219 
220  ParameterList myList("AnyNumberValidatorList");
221  myList.set(defaultParameterName, 10.0,
222  "A parameter with the default AnyNumberValidator on it", defaultValidator);
223  myList.set(nonDefaultParameterName, 1,
224  "A prameter with an AnyNumberValidator on it that has the preferred and accepted types differnet from the default",
225  nonDefaultValidator);
226 
227  RCP<ParameterList> readInPL = writeThenReadPL(myList);
228 
229  RCP<const AnyNumberParameterEntryValidator> readinDefaultValidator =
230  rcp_dynamic_cast<const AnyNumberParameterEntryValidator>(
231  readInPL->getEntry(defaultParameterName).validator(), true);
232  TEST_EQUALITY(readinDefaultValidator->isDoubleAllowed(),
233  defaultValidator->isDoubleAllowed());
234  TEST_EQUALITY(readinDefaultValidator->isIntAllowed(),
235  defaultValidator->isIntAllowed());
236  TEST_EQUALITY(readinDefaultValidator->isStringAllowed(),
237  defaultValidator->isStringAllowed());
238  TEST_EQUALITY(readinDefaultValidator->getPreferredType(),
239  defaultValidator->getPreferredType());
240 
241  RCP<const AnyNumberParameterEntryValidator> readinNonDefaultValidator =
242  rcp_dynamic_cast<const AnyNumberParameterEntryValidator>(
243  readInPL->getEntry(nonDefaultParameterName).validator(), true);
244  TEST_EQUALITY(readinNonDefaultValidator->isDoubleAllowed(),
245  nonDefaultValidator->isDoubleAllowed());
246  TEST_EQUALITY(readinNonDefaultValidator->isIntAllowed(),
247  nonDefaultValidator->isIntAllowed());
248  TEST_EQUALITY(readinNonDefaultValidator->isStringAllowed(),
249  nonDefaultValidator->isStringAllowed());
250  TEST_EQUALITY(readinNonDefaultValidator->getPreferredType(),
251  nonDefaultValidator->getPreferredType());
252 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [106/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
is_null   
)

Definition at line 204 of file ConstNonconstObjectContainer.cpp.

204  {
205  ConstNonconstObjectContainer<std::vector<double> > vectorObj;
206  TEST_ASSERT( is_null(vectorObj) );
207 }
TEST_ASSERT(nonnull(readInCon))
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [107/224]

Teuchos::TEUCHOS_UNIT_TEST ( ConstNonconstObjectContainer  ,
nonnull   
)

Definition at line 210 of file ConstNonconstObjectContainer.cpp.

210  {
211  RCP<std::vector<double> > vec = rcp(new std::vector<double>);
212  ConstNonconstObjectContainer<std::vector<double> > vectorObj(vec);
213  TEST_ASSERT( nonnull(vectorObj) );
214 }
bool nonnull(const ArrayRCP< T > &p)
Returns true if p.get()!=NULL.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [108/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
pre_iterate_forward_no_filtering   
)

Definition at line 211 of file FilteredIterator_UnitTests.cpp.

212 {
213  typedef Array<int>::const_iterator citr_t;
214  Array<int> a = tuple<int>(1, 2, 3);
215  FilteredIterator<citr_t,SelectAll<int> > itr(a.begin(), a.begin(), a.end());
216  FilteredIterator<citr_t,SelectAll<int> > itr_end(a.end(), a.begin(), a.end());
217  TEST_ITER_INEQUALITY(itr, itr_end);
218  TEST_EQUALITY_CONST(*itr, 1);
219  ECHO(++itr);
220  TEST_EQUALITY_CONST(*itr, 2);
221  ECHO(++itr);
222  TEST_EQUALITY_CONST(*itr, 3);
223  ECHO(++itr);
224  TEST_ITER_EQUALITY(itr, itr_end);
225 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [109/224]

Teuchos::TEUCHOS_UNIT_TEST ( RCPNodeHandle  ,
add_New_RCPNode_add_owning_twice_error   
)

Definition at line 213 of file RCPNodeHandle_UnitTests.cpp.

214 {
215  SET_RCPNODE_TRACING();
216 #ifdef HAVE_TEUCHOS_STACKTRACE
217  // Make sure that you store a stacktrace so as not to affect the RCPNode count below!
219 #endif
220  A *a_ptr = new A;
221  RCPNode *node1 = basicRCPNodeNoAlloc<A>(a_ptr, true);
222  const int numActiveNodesBase = RCPNodeTracer::numActiveRCPNodes();
223  ECHO(RCPNodeTracer::addNewRCPNode(node1, "dummy1"));
224  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+1);
225  RCPNode *node2 = basicRCPNodeNoAlloc<A>(a_ptr, true);
226  TEST_THROW(RCPNodeTracer::addNewRCPNode(node2, "dummy2"), DuplicateOwningRCPError);
227  ECHO(RCPNodeTracer::removeRCPNode(node1));
228  deleteRCPNode(&node1);
229  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase);
230  node2->has_ownership(false);
231  deleteRCPNode(&node2);
232 }
void store_stacktrace()
Stores the current stacktrace into an internal global variable.
void deleteRCPNode(RCPNode **node)
char * A[COUNT]
Definition: smash_test.c:14
Definition: PackageA.cpp:3
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [110/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
param_isParameter_isSublist_isType   
)

Definition at line 218 of file ParameterList_UnitTests.cpp.

219 {
220  ParameterList pl;
221  ECHO(pl.set("my int", 3));
222  ECHO(const int my_int = pl.get<int>("my int"));
223  TEST_EQUALITY_CONST(my_int, 3);
224  TEST_EQUALITY_CONST(pl.isParameter("my int"), true);
225  TEST_EQUALITY_CONST(pl.isParameter("Does not Exist"), false);
226  TEST_EQUALITY_CONST(pl.isSublist("my int"), false);
227  TEST_EQUALITY_CONST(pl.isSublist("Does not exist"), false);
228  TEST_EQUALITY_CONST(pl.isType<int>("my int"), true);
229  TEST_EQUALITY_CONST(pl.isType<double>("my int"), false);
230  TEST_EQUALITY_CONST(pl.isType("my int", static_cast<int*>(0)), true);
231  TEST_EQUALITY_CONST(pl.isType("my int", static_cast<double*>(0)), false);
232 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [111/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Conditions  ,
testConditionException   
)

Definition at line 219 of file Condition_UnitTests.cpp.

219  {
220  //Settin up initial list
221  RCP<ParameterList> testingList = rcp(new ParameterList("Condition Testing List"));
222  testingList->set("double param",1.0);
223  testingList->set("string param", "awesome");
224  RCP<ParameterList> testingList2 = rcp(new ParameterList("Condition Testing List"));
225  testingList2->set("bool param", true);
226 
227  TEST_THROW(BoolCondition boolCon1(testingList->getEntryRCP("bool param")), InvalidConditionException);
228  TEST_THROW(StringCondition stringCon1(testingList->getEntryRCP("double param"), "coke"), InvalidConditionException);
229  TEST_THROW(BoolCondition boolCon1(testingList->getEntryRCP("double param")), InvalidConditionException);
230  Condition::ConstConditionList conList1;
231  TEST_THROW(AndCondition andCon1(conList1), InvalidConditionException);
232  RCP<const Condition> con1;
233  TEST_THROW(NotCondition notCon1(con1), InvalidConditionException);
234 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
RCP< BoolCondition > boolCon1
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [112/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
basicNonconstIterators   
)

Definition at line 220 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

221 {
222  typedef StringIndexedOrderedValueObjectContainer<int>::Iterator Iterator;
223  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
224  ECHO(oc.setObj("c", 1));
225  ECHO(oc.setObj("a", 2));
226  ECHO(oc.setObj("b", 3));
227  ECHO(Iterator itr = oc.nonconstBegin());
228  TEST_EQUALITY_CONST(itr->first, "c");
229  TEST_EQUALITY_CONST(itr->second, 1);
230  ECHO(itr->second = 5);
231  TEST_EQUALITY_CONST(itr->second, 5);
232  ECHO(++itr);
233  TEST_EQUALITY_CONST(itr->first, "a");
234  TEST_EQUALITY_CONST(itr->second, 2);
235  ECHO(itr->second = 6);
236  TEST_EQUALITY_CONST(itr->second, 6);
237  ECHO(++itr);
238  TEST_EQUALITY_CONST(itr->first, "b");
239  TEST_EQUALITY_CONST(itr->second, 3);
240  ECHO(itr->second = 7);
241  TEST_EQUALITY_CONST(itr->second, 7);
242  ECHO(++itr);
243  TEST_ITER_EQUALITY(itr, oc.nonconstEnd());
244 }
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [113/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
post_iterate_forward_no_filtering   
)

Definition at line 228 of file FilteredIterator_UnitTests.cpp.

229 {
230  typedef Array<int>::const_iterator citr_t;
231  Array<int> a = tuple<int>(1, 2, 3);
232  FilteredIterator<citr_t,SelectAll<int> > itr(a.begin(), a.begin(), a.end());
233  FilteredIterator<citr_t,SelectAll<int> > itr_end(a.end(), a.begin(), a.end());
234  TEST_ITER_INEQUALITY(itr, itr_end);
235  ECHO(const int v0 = *itr++);
236  TEST_EQUALITY_CONST(v0, 1);
237  ECHO(const int v1 = *itr++);
238  TEST_EQUALITY_CONST(v1, 2);
239  ECHO(const int v2 = *itr++);
240  TEST_EQUALITY_CONST(v2, 3);
241  TEST_ITER_EQUALITY(itr, itr_end);
242 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [114/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
setObjectFactory   
)

Definition at line 233 of file ObjectBuilder_UnitTests.cpp.

233  {
234  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>("Foo","Foo Type");
235  TEST_EQUALITY_CONST( ob->getObjectName(), "None" );
236  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
237  TEST_EQUALITY_CONST( ob->getObjectName(), "Foo A" ); // 3.
238  RCP<const ParameterList> pl = ob->getValidParameters();
239  TEST_EQUALITY_CONST( pl->get<std::string>("Foo Type"), "Foo A" ); // 1.
240  TEST_EQUALITY_CONST( pl->sublist("Foo A").get<std::string>("String"), "A" ); // 1.
241  const RCP<Foo> foo = ob->create();
242  const RCP<FooA> fooA = rcp_dynamic_cast<FooA>(foo,false);
243  TEST_EQUALITY_CONST( is_null(fooA), false ); // 2.
244  ob->setObjectFactory(abstractFactoryStd<Foo,FooB>(),"Foo B");
245  pl = ob->getValidParameters();
246  TEST_EQUALITY_CONST( pl->get<std::string>("Foo Type"), "Foo B" ); // 4.
247  TEST_THROW( ob->setObjectFactory(abstractFactoryStd<Foo,FooC>(),""), std::logic_error ); // 1a.
248 }
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [115/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
sublist_isParameter_isSublist_isType   
)

Definition at line 235 of file ParameterList_UnitTests.cpp.

236 {
237  ParameterList pl;
238  ECHO(pl.sublist("my sublist").set("my int", 3));
239  ECHO(const int my_int = getConst(pl).sublist("my sublist").get<int>("my int"));
240  TEST_EQUALITY_CONST(my_int, 3);
241  TEST_EQUALITY_CONST(pl.isParameter("my sublist"), true); // Should be false, but backward compatiable!
242  TEST_EQUALITY_CONST(pl.isParameter("Does not Exist"), false);
243  TEST_EQUALITY_CONST(pl.isSublist("my sublist"), true);
244  TEST_EQUALITY_CONST(pl.isType<ParameterList>("my sublist"), true);
245  TEST_EQUALITY_CONST(pl.isType<double>("my sublist"), false);
246  TEST_EQUALITY_CONST(pl.isType("my sublist", static_cast<ParameterList*>(0)), true);
247  TEST_EQUALITY_CONST(pl.isType("my sublist", static_cast<double*>(0)), false);
248 }
RCP< ParameterList > sublist(const RCP< ParameterList > &paramList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
Return a RCP to a sublist in another RCP-ed parameter list.
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [116/224]

Teuchos::TEUCHOS_UNIT_TEST ( RCPNodeHandle  ,
add_New_RCPNode_add_nonowning_twice_okay_1   
)

Definition at line 235 of file RCPNodeHandle_UnitTests.cpp.

236 {
237  SET_RCPNODE_TRACING();
238  A *a_ptr = new A;
239  RCPNode *node1 = basicRCPNodeNoAlloc<A>(a_ptr, true);
240  const int numActiveNodesBase = RCPNodeTracer::numActiveRCPNodes();
241  ECHO(RCPNodeTracer::addNewRCPNode(node1, "dummy1"));
242  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+1);
243  RCPNode *node2 = basicRCPNodeNoAlloc<A>(a_ptr, false);
244  ECHO(RCPNodeTracer::addNewRCPNode(node2, "dummy2"));
245  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+2);
246  TEST_EQUALITY(RCPNodeTracer::getExistingRCPNode(a_ptr), node1);
247  ECHO(RCPNodeTracer::removeRCPNode(node2));
248  deleteRCPNode(&node2);
249  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+1);
250  ECHO(RCPNodeTracer::removeRCPNode(node1));
251  deleteRCPNode(&node1);
252  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase);
253 }
void deleteRCPNode(RCPNode **node)
char * A[COUNT]
Definition: smash_test.c:14
Definition: PackageA.cpp:3
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [117/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
pre_iterate_backward_no_filtering   
)

Definition at line 245 of file FilteredIterator_UnitTests.cpp.

246 {
247  typedef Array<int>::const_iterator citr_t;
248  Array<int> a = tuple<int>(1, 2, 3);
249  FilteredIterator<citr_t,SelectAll<int> > itr(a.end(), a.begin(), a.end());
250  FilteredIterator<citr_t,SelectAll<int> > itr_begin(a.begin(), a.begin(), a.end());
251  ECHO(--itr);
252  TEST_EQUALITY_CONST(*itr, 3);
253  ECHO(--itr);
254  TEST_EQUALITY_CONST(*itr, 2);
255  ECHO(--itr);
256  TEST_EQUALITY_CONST(*itr, 1);
257  TEST_ITER_EQUALITY(itr, itr_begin);
258 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [118/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
basicConstIterators   
)

Definition at line 247 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

248 {
249  typedef StringIndexedOrderedValueObjectContainer<int>::ConstIterator ConstIterator;
250  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
251  ECHO(oc.setObj("c", 1));
252  ECHO(oc.setObj("a", 2));
253  ECHO(oc.setObj("b", 3));
254  ECHO(ConstIterator itr = oc.begin());
255  TEST_EQUALITY_CONST(itr->first, "c");
256  TEST_EQUALITY_CONST(itr->second, 1);
257  ECHO(++itr);
258  TEST_EQUALITY_CONST(itr->first, "a");
259  TEST_EQUALITY_CONST(itr->second, 2);
260  ECHO(++itr);
261  TEST_EQUALITY_CONST(itr->first, "b");
262  TEST_EQUALITY_CONST(itr->second, 3);
263  ECHO(++itr);
264  TEST_ITER_EQUALITY(itr, oc.end());
265 }
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [119/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
setObjectFactory_bad   
)

Definition at line 251 of file ObjectBuilder_UnitTests.cpp.

251  {
252  {
253  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>("Foo","Foo Type");
254  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
255  // ObjectBuilder will let you add the object, but will not throw until getValidParameters is called
256 #ifdef TEUCHOS_DEBUG
257  TEST_THROW( ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A"), std::logic_error );
258 #else // TEUCHOS_DEBUG
259  TEST_NOTHROW( ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A") );
260  TEST_THROW( ob->getValidParameters(), std::logic_error );
261 #endif // TEUCHOS_DEBUG
262  }
263  {
264  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>("Foo","Foo Type");
265  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
266  TEST_NOTHROW( ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"New Foo A") );
267  TEST_NOTHROW( ob->getValidParameters() );
268  }
269 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [120/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
set_doc   
)

Definition at line 251 of file ParameterList_UnitTests.cpp.

252 {
253  ParameterList pl;
254  ECHO(pl.set("my int", 3, "Some documentation"));
255  ECHO(const ParameterEntry& my_int_param = getConst(pl).getEntry("my int"));
256  TEST_EQUALITY_CONST(my_int_param.docString(), "Some documentation");
257  TEST_ASSERT(is_null(my_int_param.validator()));
258 }
TEST_ASSERT(nonnull(readInCon))
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [121/224]

Teuchos::TEUCHOS_UNIT_TEST ( RCPNodeHandle  ,
add_New_RCPNode_add_nonowning_twice_okay_2   
)

Definition at line 256 of file RCPNodeHandle_UnitTests.cpp.

257 {
258  SET_RCPNODE_TRACING();
259  A *a_ptr = new A;
260  RCPNode *node1 = basicRCPNodeNoAlloc<A>(a_ptr, false);
261  const int numActiveNodesBase = RCPNodeTracer::numActiveRCPNodes();
262  ECHO(RCPNodeTracer::addNewRCPNode(node1, "dummy1"));
263  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+1);
264  RCPNode *node2 = basicRCPNodeNoAlloc<A>(a_ptr, true);
265  ECHO(RCPNodeTracer::addNewRCPNode(node2, "dummy2"));
266  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+2);
267  TEST_EQUALITY(RCPNodeTracer::getExistingRCPNode(a_ptr), node2);
268  ECHO(RCPNodeTracer::removeRCPNode(node2));
269  deleteRCPNode(&node2);
270  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+1);
271  ECHO(RCPNodeTracer::removeRCPNode(node1));
272  deleteRCPNode(&node1);
273  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase);
274 }
void deleteRCPNode(RCPNode **node)
char * A[COUNT]
Definition: smash_test.c:14
Definition: PackageA.cpp:3
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [122/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
BoolVisualDepSerialization   
)

Definition at line 259 of file Dependencies_SerializationTests.cpp.

259  {
260  std::string dependee1 = "bool param";
261  std::string dependee2 = "bool param2";
262  std::string dependent1 = "dependent param1";
263  std::string dependent2 = "dependent param2";
264  ParameterList myDepList("Bool Visual Dep List");
265  RCP<DependencySheet> myDepSheet = rcp(new DependencySheet);
266  myDepList.set(dependee1, true);
267  myDepList.set(dependee2, true);
268  myDepList.set(dependent1, 1.0);
269  myDepList.set(dependent2, 1.0);
270 
271  RCP<BoolVisualDependency> trueBoolVisDep = rcp(
272  new BoolVisualDependency(
273  myDepList.getEntryRCP(dependee1),
274  myDepList.getEntryRCP(dependent1)));
275 
276  Dependency::ParameterEntryList dependentList;
277  dependentList.insert(myDepList.getEntryRCP(dependent1));
278  dependentList.insert(myDepList.getEntryRCP(dependent2));
279 
280  RCP<BoolVisualDependency> falseBoolVisDep = rcp(
281  new BoolVisualDependency(
282  myDepList.getEntryRCP(dependee2),
284  false));
285 
286  myDepSheet->addDependency(trueBoolVisDep);
287  myDepSheet->addDependency(falseBoolVisDep);
288 
289  RCP<DependencySheet> readInDepSheet = rcp(new DependencySheet);
290 
291  XMLParameterListWriter plWriter;
292  XMLObject xmlOut = plWriter.toXML(myDepList, myDepSheet);
293  out << xmlOut.toString();
294 
295  RCP<ParameterList> readInList =
296  writeThenReadPL(myDepList, myDepSheet, readInDepSheet);
297 
298  RCP<ParameterEntry> readinDependee1 = readInList->getEntryRCP(dependee1);
299  RCP<ParameterEntry> readinDependent1 = readInList->getEntryRCP(dependent1);
300  RCP<ParameterEntry> readinDependee2 = readInList->getEntryRCP(dependee2);
301  RCP<ParameterEntry> readinDependent2 = readInList->getEntryRCP(dependent2);
302 
303  RCP<Dependency> readinDep1 =
304  *(readInDepSheet->getDependenciesForParameter(readinDependee1)->begin());
305 
306  RCP<Dependency> readinDep2 =
307  *(readInDepSheet->getDependenciesForParameter(readinDependee2)->begin());
308 
309  BASIC_DEPENDENCY_TEST(readinDep1, BoolVisualDependency, 1, 1);
310  VERIFY_DEPENDEE(readinDep1, readinDependee1);
311  VERIFY_DEPENDENT(readinDep1, readinDependent1);
312 
313  BASIC_DEPENDENCY_TEST(readinDep2, BoolVisualDependency, 1, 2);
314  VERIFY_DEPENDEE(readinDep2, readinDependee2);
315  VERIFY_DEPENDENT(readinDep2, readinDependent1);
316  VERIFY_DEPENDENT(readinDep2, readinDependent2);
317 
318 
319  RCP<BoolVisualDependency> castedDep1 =
320  rcp_dynamic_cast<BoolVisualDependency>(readinDep1, true);
321  RCP<BoolVisualDependency> castedDep2 =
322  rcp_dynamic_cast<BoolVisualDependency>(readinDep2, true);
323 
324  TEST_EQUALITY(castedDep1->getShowIf(), trueBoolVisDep->getShowIf());
325  TEST_EQUALITY(castedDep2->getShowIf(), falseBoolVisDep->getShowIf());
326 }
Dependency::ParameterEntryList dependentList
RCP< ParameterEntry > readinDependent2
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
TEST_EQUALITY(rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep2->getDefaultValidator(), true) ->getMax(), defaultVali->getMax())
RCP< ParameterEntry > readinDependee1
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
RCP< ParameterEntry > readinDependent1
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
VERIFY_DEPENDEE(readinDep2, readinDependee3)
RCP< ConditionVisualDependency > castedDep2
RCP< DependencySheet > myDepSheet
VERIFY_DEPENDENT(readinDep2, readinDependent1)
RCP< ConditionVisualDependency > castedDep1
RCP< Dependency > readinDep1
RCP< DependencySheet > readInDepSheet
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
ParameterList myDepList("String Vali Dep List")
RCP< Dependency > readinDep2
BASIC_DEPENDENCY_TEST(readinDep2, StringValidatorDependency, 1, 2)
out<< xmlOut.toString();RCP< ParameterList > readInList
RCP< ParameterEntry > readinDependee2
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
XMLParameterListWriter plWriter
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [123/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
post_iterate_backward_no_filtering   
)

Definition at line 261 of file FilteredIterator_UnitTests.cpp.

262 {
263  typedef Array<int>::const_iterator citr_t;
264  Array<int> a = tuple<int>(1, 2, 3);
265  FilteredIterator<citr_t,SelectAll<int> > itr(a.end(), a.begin(), a.end());
266  FilteredIterator<citr_t,SelectAll<int> > itr_begin(a.begin(), a.begin(), a.end());
267  ECHO(--itr);
268  ECHO(const int v0 = *itr--);
269  TEST_EQUALITY_CONST(v0, 3);
270  ECHO(const int v1 = *itr--);
271  TEST_EQUALITY_CONST(v1, 2);
272  ECHO(const int v2 = *itr);
273  TEST_EQUALITY_CONST(v2, 1);
274  TEST_ITER_EQUALITY(itr, itr_begin);
275 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [124/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
set_doc_validator   
)

Definition at line 261 of file ParameterList_UnitTests.cpp.

262 {
263  ParameterList pl;
264  ECHO(pl.set("my int", 3, "Some documentation", rcp(new DummyValidator)));
265  ECHO(const ParameterEntry& my_int_param = getConst(pl).getEntry("my int"));
266  TEST_EQUALITY_CONST(my_int_param.docString(), "Some documentation");
267  TEST_NOTHROW(rcp_dynamic_cast<const DummyValidator>(my_int_param.validator(), true));
268 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [125/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
removeObj_idx_first   
)

Definition at line 268 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

269 {
270  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
271  typedef SIOVOCB::OrdinalIndex OI;
272  typedef StringIndexedOrderedValueObjectContainer<OI>::ConstIterator ConstIterator;
273  ECHO(StringIndexedOrderedValueObjectContainer<OI> oc);
274  ECHO(oc.setObj("c", 1));
275  ECHO(oc.setObj("a", 2));
276  ECHO(oc.setObj("b", 3));
277  TEST_EQUALITY_CONST(oc.numObjects(), 3);
278  TEST_EQUALITY_CONST(oc.numStorage(), 3);
279  ECHO(const OI &b = *oc.getObjPtr("b"));
280  ECHO(oc.removeObj(0));
281  TEST_EQUALITY_CONST(oc.numObjects(), 2);
282  TEST_EQUALITY_CONST(oc.numStorage(), 3);
283  TEST_EQUALITY(&b, oc.getObjPtr("b").get());
284  ECHO(ConstIterator itr = oc.begin());
285  TEST_EQUALITY_CONST(itr->first, "a");
286  TEST_EQUALITY_CONST(itr->second.idx, 2);
287  TEST_EQUALITY_CONST(itr->isActive(), true);
288  ECHO(++itr);
289  TEST_EQUALITY_CONST(itr->first, "b");
290  TEST_EQUALITY_CONST(itr->second.idx, 3);
291  TEST_EQUALITY_CONST(itr->isActive(), true);
292  ECHO(++itr);
293  TEST_ITER_EQUALITY(itr, oc.end());
294 }
void char ipfint ipfint ipfint const double const double ipfint const double * b
Definition: IpBlas.cpp:44
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [126/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
set_invalid_int_first   
)

Definition at line 271 of file ParameterList_UnitTests.cpp.

272 {
273  ParameterList pl;
274  ECHO(const RCP<ParameterEntryValidator>
275  validator(new Teuchos::EnhancedNumberValidator<int>(0, 1)));
276  TEST_THROW(pl.set("my int", -1, "", validator),
277  Exceptions::InvalidParameterValue);
278  TEST_EQUALITY_CONST(pl.numParams(), 0);
279 }
Class uesd to validate a particular type of number.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [127/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
getObjectName   
)

Definition at line 275 of file ObjectBuilder_UnitTests.cpp.

275  {
276  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>("Foo", "Foo Type");
277  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
278  ob->setObjectFactory(abstractFactoryStd<Foo,FooB>(),"Foo B");
279  const RCP<ParameterList> pl = parameterList();
280  pl->setParameters(*ob->getValidParameters()); // copy parameters
281  pl->set("Foo Type", "Foo A"); // change default
282  // 1.
283  TEST_EQUALITY_CONST( ob->getObjectName(), "Foo B" );
284  // 2.
285  ob->setParameterList(pl);
286  TEST_EQUALITY_CONST( ob->getObjectName(), "Foo A" );
287 }
RCP< ParameterList > parameterList()
Nonmember constructor.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59

◆ TEUCHOS_UNIT_TEST() [128/224]

Teuchos::TEUCHOS_UNIT_TEST ( RCPNodeHandle  ,
add_New_RCPNode_add_two_nodes_same_obj   
)

Definition at line 277 of file RCPNodeHandle_UnitTests.cpp.

278 {
279  SET_RCPNODE_TRACING();
280  ECHO(C *c_ptr = new C);
281  ECHO(RCPNode *node_c = basicRCPNodeNoAlloc<C>(c_ptr, true));
282  ECHO(RCPNode *node_b1 = basicRCPNodeNoAlloc<B1>(c_ptr, true));
283  ECHO(const int numActiveNodesBase = RCPNodeTracer::numActiveRCPNodes());
284  ECHO(RCPNodeTracer::addNewRCPNode(node_c, "dummy"));
285  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+1);
286 #ifdef HAS_TEUCHOS_GET_BASE_OBJ_VOID_PTR
287  // We can detect that these are the same object!
288  TEST_THROW(RCPNodeTracer::addNewRCPNode(node_b1, "dummy"), DuplicateOwningRCPError);
289 #else
290  // We can not detect if these are the same object!
291  ECHO(RCPNodeTracer::addNewRCPNode(node_b1, "dummy"));
292  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+2);
293  ECHO(RCPNodeTracer::removeRCPNode(node_b1));
294 #endif
295  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase+1);
296  ECHO(RCPNodeTracer::removeRCPNode(node_c));
297  TEST_EQUALITY(RCPNodeTracer::numActiveRCPNodes(), numActiveNodesBase);
298  ECHO(node_b1->has_ownership(false));
299  ECHO(deleteRCPNode(&node_b1));
300  ECHO(deleteRCPNode(&node_c));
301 }
void deleteRCPNode(RCPNode **node)
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Definition: PackageC.cpp:3
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [129/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
pre_iterate_forward_filter_even   
)

Definition at line 278 of file FilteredIterator_UnitTests.cpp.

279 {
280  typedef Array<int>::const_iterator citr_t;
281  Array<int> a = tuple<int>(1, 2, 3, 4);
282  FilteredIterator<citr_t,SelectEven<int> > itr(a.begin(), a.begin(), a.end());
283  FilteredIterator<citr_t,SelectEven<int> > itr_end(a.end(), a.begin(), a.end());
284  TEST_ITER_INEQUALITY(itr, itr_end);
285  TEST_EQUALITY_CONST(*itr, 2);
286  ECHO(++itr);
287  TEST_EQUALITY_CONST(*itr, 4);
288  ECHO(++itr);
289  TEST_ITER_EQUALITY(itr, itr_end);
290 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [130/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
set_invalid_int_second   
)

Definition at line 282 of file ParameterList_UnitTests.cpp.

283 {
284  ParameterList pl;
285  ECHO(const RCP<ParameterEntryValidator>
286  validator(new Teuchos::EnhancedNumberValidator<int>(0, 1)));
287  TEST_NOTHROW(pl.set("my int", 1, "", validator));
288  TEST_EQUALITY_CONST(pl.numParams(), 1);
289  TEST_EQUALITY_CONST(pl.get<int>("my int"), 1);
290  TEST_THROW(pl.set("my int", -1), Exceptions::InvalidParameterValue);
291  TEST_EQUALITY_CONST(pl.get<int>("my int"), 1);
292 }
Class uesd to validate a particular type of number.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [131/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validators  ,
anyNumberValidator   
)

Definition at line 286 of file Validator_UnitTest.cpp.

287 {
288  RCP<ParameterList> userList = rcp(new ParameterList("User List"));
289  RCP<ParameterList> validList = rcp(new ParameterList("Valid List"));
290 
292  intDoubleTypes.allowString(false);
294  intStringTypes.allowDouble(false);
296  intTypes.allowDouble(false);
297  intTypes.allowString(false);
298 
299  // set up validators to test
300  // default prefers double and allows string and int
301  RCP<Teuchos::AnyNumberParameterEntryValidator> allValidator =
303  RCP<Teuchos::AnyNumberParameterEntryValidator> intDoubleValidator =
306  RCP<Teuchos::AnyNumberParameterEntryValidator> intStringValidator =
309  RCP<Teuchos::AnyNumberParameterEntryValidator> intValidator =
312 
313  // first check the 'good' setups which do not throw
314  TEST_NOTHROW(validList->set( "allParameter", "1.1", "documentation",
315  allValidator));
316  TEST_NOTHROW(validList->set( "allParameter", 1.1, "documentation",
317  allValidator));
318  TEST_NOTHROW(validList->set( "allParameter", "1", "documentation",
319  allValidator));
320  TEST_NOTHROW(validList->set( "allParameter", 1, "documentation",
321  allValidator));
322  TEST_NOTHROW(validList->set( "intDoubleParameter", 1.1, "documentation",
323  intDoubleValidator));
324  TEST_NOTHROW(validList->set( "intDoubleParameter", 1, "documentation",
325  intDoubleValidator));
326  TEST_NOTHROW(validList->set( "intStringParameter", "1", "documentation",
327  intStringValidator));
328  TEST_NOTHROW(validList->set( "intStringParameter", 1, "documentation",
329  intStringValidator));
330  TEST_NOTHROW(validList->set( "intParameter", 1, "documentation",
331  intValidator));
332 
333  // This was a special case that might warrant discussion.
334  // The issue is for validators which accept string/int but not double.
335  // In the original setup the validator would always call getDouble
336  // internally and accept a string of "1.1" without error.
337  TEST_NOTHROW(validList->set( "intStringParameter", "1.1", "documentation",
338  intStringValidator));
339 
340  //
341  // these are some cases which throw independent of HAVE_TEUCHOSCORE_CXX11
342  //
343 
344  // if string it not allowed you can't use a string ever
345  TEST_THROW(validList->set( "intDoubleParameter", "1.1", "documentation",
346  intDoubleValidator), Exceptions::InvalidParameterType);
347 
348  // it also throws for a double number - double not allowed
349  TEST_THROW(validList->set( "intStringParameter", 1.1, "documentation",
350  intStringValidator), Exceptions::InvalidArgument);
351 
352  // for int only it can't be a string - any string will throw
353  TEST_THROW(validList->set( "intParameter", "1", "documentation",
354  intValidator), Exceptions::InvalidParameter);
355 
356  // this int only it can't be a double because double is not allowed
357  TEST_THROW(validList->set( "intParameter", 1.1, "documentation",
358  intValidator), Exceptions::InvalidParameter);
359 
360  //
361  // these behaviors now depend on HAVE_TEUCHOSCORE_CXX11
362  // std::stod and std::stoi will be used for HAVE_TEUCHOSCORE_CXX11
363  // std::atof and std::atoi will be used for no CXX11
364  //
365 #ifdef HAVE_TEUCHOSCORE_CXX11
366  // for double types we throw for badly formatted string on std::stod
367  // this will check the double type first because it is PREFER_DOUBLE
368  TEST_THROW(validList->set( "allParameter", "1.1x", "documentation",
369  allValidator), Exceptions::InvalidArgument);
370  TEST_THROW(validList->set( "intDoubleParameter", "1.1x", "documentation",
371  allValidator), Exceptions::InvalidArgument);
372  TEST_THROW(validList->set( "allParameter", "x1.1", "documentation",
373  allValidator), Exceptions::InvalidArgument);
374  TEST_THROW(validList->set( "intDoubleParameter", "x1.1", "documentation",
375  allValidator), Exceptions::InvalidArgument);
376  // for int/string but no double - std::stoi throws for invalid formatting
377  TEST_THROW(validList->set( "intStringParameter", "1x", "documentation",
378  intStringValidator), Exceptions::InvalidArgument);
379  TEST_THROW(validList->set( "intStringParameter", "x1", "documentation",
380  intStringValidator), Exceptions::InvalidArgument);
381  TEST_THROW(validList->set( "intStringParameter", "1 x", "documentation",
382  intStringValidator), Exceptions::InvalidArgument);
383 #else
384  // for int/double/string std::atod does NOT throw - this is the old behavior
385  // this is different now when HAVE_TEUCHOSCORE_CXX11 is ON - see above
386  TEST_NOTHROW(validList->set( "allParameter", "1.1x", "documentation",
387  allValidator));
388  // for int/string std::atoi does NOT throw - this is the old behavior
389  // this is different now when HAVE_TEUCHOSCORE_CXX11 is ON - see above
390  TEST_NOTHROW(validList->set( "intStringParameter", "1.1x", "documentation",
391  intStringValidator));
392 #endif
393 }
AcceptedTypes & allowString(bool _allowString)
Set allow an std::string value or not.
Standard implementation of a ParameterEntryValidator that accepts numbers from a number of different ...
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
Determines the types that are accepted.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
AcceptedTypes & allowDouble(bool _allowDouble)
Set allow a double value or not.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [132/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
pre_iterate_forward_filter_odd   
)

Definition at line 293 of file FilteredIterator_UnitTests.cpp.

294 {
295  typedef Array<int>::const_iterator citr_t;
296  Array<int> a = tuple<int>(1, 2, 3, 4);
297  FilteredIterator<citr_t,SelectOdd<int> > itr(a.begin(), a.begin(), a.end());
298  FilteredIterator<citr_t,SelectOdd<int> > itr_end(a.end(), a.begin(), a.end());
299  TEST_ITER_INEQUALITY(itr, itr_end);
300  TEST_EQUALITY_CONST(*itr, 1);
301  ECHO(++itr);
302  TEST_EQUALITY_CONST(*itr, 3);
303  ECHO(++itr);
304  TEST_ITER_EQUALITY(itr, itr_end);
305 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [133/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
set_get_entry   
)

Definition at line 295 of file ParameterList_UnitTests.cpp.

296 {
297  ParameterList pl;
298  ECHO(pl.setEntry("my int", ParameterEntry(as<int>(3), true, true, "Some doc", rcp(new DummyValidator))));
299  ECHO(const ParameterEntry& my_int_param = getConst(pl).getEntry("my int"));
300  TEST_EQUALITY_CONST(my_int_param.docString(), "Some doc");
301  ECHO(const int my_int_1 = my_int_param.getValue<int>(0));
302  TEST_EQUALITY_CONST(my_int_1, 3);
303  TEST_EQUALITY_CONST(my_int_param.isUsed(), true);
304  TEST_EQUALITY_CONST(my_int_param.isList(), false); // The isList entry is ignored!
305  TEST_INEQUALITY_CONST(rcp_dynamic_cast<const DummyValidator>(my_int_param.validator(), true), null);
306 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [134/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
removeObj_key_first   
)

Definition at line 297 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

298 {
299  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
300  typedef SIOVOCB::OrdinalIndex OI;
301  typedef StringIndexedOrderedValueObjectContainer<OI>::ConstIterator ConstIterator;
302  ECHO(StringIndexedOrderedValueObjectContainer<OI> oc);
303  ECHO(oc.setObj("c", 1));
304  ECHO(oc.setObj("a", 2));
305  ECHO(oc.setObj("b", 3));
306  TEST_EQUALITY_CONST(oc.numObjects(), 3);
307  TEST_EQUALITY_CONST(oc.numStorage(), 3);
308  ECHO(const OI &b = *oc.getObjPtr("b"));
309  ECHO(oc.removeObj("c"));
310  TEST_EQUALITY_CONST(oc.numObjects(), 2);
311  TEST_EQUALITY_CONST(oc.numStorage(), 3);
312  TEST_EQUALITY(&b, oc.getObjPtr("b").get());
313  ECHO(ConstIterator itr = oc.begin());
314  TEST_EQUALITY_CONST(itr->first, "a");
315  TEST_EQUALITY_CONST(itr->second.idx, 2);
316  TEST_EQUALITY_CONST(itr->isActive(), true);
317  ECHO(++itr);
318  TEST_EQUALITY_CONST(itr->first, "b");
319  TEST_EQUALITY_CONST(itr->second.idx, 3);
320  TEST_EQUALITY_CONST(itr->isActive(), true);
321  ECHO(++itr);
322  TEST_ITER_EQUALITY(itr, oc.end());
323 }
void char ipfint ipfint ipfint const double const double ipfint const double * b
Definition: IpBlas.cpp:44
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [135/224]

Teuchos::TEUCHOS_UNIT_TEST ( TimeMonitor  ,
YamlLabelQuoting   
)

Definition at line 303 of file TimeMonitor_UnitTests.cpp.

304  {
305  using Teuchos::Array;
307  using Teuchos::parameterList;
308  using Teuchos::RCP;
309  using Teuchos::Time;
310  typedef Array<std::string>::size_type size_type;
311 
312  Array<std::string> inputLabels, outputLabels;
313 
314  // Make sure to exercise things that don't need quoting, like
315  // spaces and certain punctuation, as well as things that do need
316  // quoting, like colons, inner double quotes, and backslashes.
317  inputLabels.push_back ("NoQuotingNeeded");
318  inputLabels.push_back ("No quoting needed");
319  inputLabels.push_back ("\"AlreadyQuotedNoQuotingNeeded\"");
320  inputLabels.push_back ("\"Already quoted, no quoting needed\"");
321  inputLabels.push_back ("\"Already quoted: quoting needed\"");
322  inputLabels.push_back ("NotQuoted:QuotingNeeded");
323  inputLabels.push_back ("Not quoted: quoting needed");
324  // Test both individual double quotes, and pairs of double quotes.
325  inputLabels.push_back ("Not quoted \" quoting needed");
326  inputLabels.push_back ("Not quoted \" \" quoting needed");
327  inputLabels.push_back ("\"Already quoted \" quoting needed\"");
328  inputLabels.push_back ("\"Already quoted \" \" quoting needed\"");
329  // Remember that in C strings, a double backslash turns into a
330  // single backslash. Our YAML output routine should turn each
331  // single backslash back into a double backslash.
332  inputLabels.push_back ("Not quoted \\ quoting needed");
333  inputLabels.push_back ("Not quoted \\\\ quoting needed");
334  inputLabels.push_back ("Not quoted \\ \\ quoting needed");
335  inputLabels.push_back ("\"Already quoted \\ quoting needed\"");
336  inputLabels.push_back ("\"Already quoted \\\\ quoting needed\"");
337  inputLabels.push_back ("\"Already quoted \\ \\ quoting needed\"");
338 
339  outputLabels.push_back ("NoQuotingNeeded");
340  outputLabels.push_back ("No quoting needed");
341  outputLabels.push_back ("\"AlreadyQuotedNoQuotingNeeded\"");
342  outputLabels.push_back ("\"Already quoted, no quoting needed\"");
343  outputLabels.push_back ("\"Already quoted: quoting needed\"");
344  outputLabels.push_back ("\"NotQuoted:QuotingNeeded\"");
345  outputLabels.push_back ("\"Not quoted: quoting needed\"");
346  outputLabels.push_back ("\"Not quoted \\\" quoting needed\"");
347  outputLabels.push_back ("\"Not quoted \\\" \\\" quoting needed\"");
348  outputLabels.push_back ("\"Already quoted \\\" quoting needed\"");
349  outputLabels.push_back ("\"Already quoted \\\" \\\" quoting needed\"");
350  outputLabels.push_back ("\"Not quoted \\\\ quoting needed\"");
351  outputLabels.push_back ("\"Not quoted \\\\\\\\ quoting needed\"");
352  outputLabels.push_back ("\"Not quoted \\\\ \\\\ quoting needed\"");
353  outputLabels.push_back ("\"Already quoted \\\\ quoting needed\"");
354  outputLabels.push_back ("\"Already quoted \\\\\\\\ quoting needed\"");
355  outputLabels.push_back ("\"Already quoted \\\\ \\\\ quoting needed\"");
356 
357  // Sanity check.
358  TEUCHOS_TEST_FOR_EXCEPTION(
359  inputLabels.size () != outputLabels.size (),
360  std::logic_error,
361  "The number of input labels is different than the number of output labels."
362  " Please ask a Teuchos developer to make sure that every test input "
363  "label has a corresponding output label.");
364 
365  Array<RCP<Time> > timers;
366  for (size_type i = 0; i < inputLabels.size (); ++i) {
367  timers.push_back (TimeMonitor::getNewCounter (inputLabels[i]));
368  }
369 
370  // The actual number of operations in the loop is proportional to
371  // the cube of the loop length. Adjust the quantities below as
372  // necessary to ensure the timer reports a nonzero elapsed time
373  // for each of the invocations.
374  const size_t loopLength = 25;
375  for (int k = 0; k < 3; ++k) {
376  for (size_type i = 0; i < timers.size (); ++i) {
377  TimeMonitor timeMon (* timers[i]);
378  slowLoop (loopLength);
379  }
380  }
381 
382  { // YAML output, compact style.
383  std::ostringstream oss;
384  RCP<ParameterList> reportParams =
385  parameterList (* (TimeMonitor::getValidReportParameters ()));
386  reportParams->set ("Report format", "YAML");
387  reportParams->set ("YAML style", "compact");
388  TimeMonitor::report (oss, reportParams);
389 
390  // Echo output to the FancyOStream out (which is a standard unit
391  // test argument). Output should only appear in "show all test
392  // details" mode.
393  out << oss.str () << std::endl;
394 
395  // Make sure that all timer labels appear correctly in the output.
396  for (size_type i = 0; i < inputLabels.size(); ++i) {
397  const size_t pos = oss.str ().find (outputLabels[i]);
398  TEST_INEQUALITY(pos, std::string::npos);
399  }
400  }
401 
402  { // YAML output, spacious style.
403  std::ostringstream oss;
404  RCP<ParameterList> reportParams =
405  parameterList (* (TimeMonitor::getValidReportParameters ()));
406  reportParams->set ("Report format", "YAML");
407  reportParams->set ("YAML style", "spacious");
408  TimeMonitor::report (oss, reportParams);
409 
410  // Echo output to the FancyOStream out (which is a standard unit
411  // test argument). Output should only appear in "show all test
412  // details" mode.
413  out << oss.str () << std::endl;
414 
415  // Make sure that all timer labels appear correctly in the output.
416  for (size_type i = 0; i < inputLabels.size(); ++i) {
417  const size_t pos = oss.str ().find (outputLabels[i]);
418  TEST_INEQUALITY(pos, std::string::npos);
419  }
420  }
421 
422  // This sets up for the next unit test.
423  TimeMonitor::clearCounters ();
424  }
Wall-clock timer.
void __VACALL report(lprec *lp, int level, char *format,...)
Definition: lp_report.c:55
A list of parameters of arbitrary type.
Smart reference counting pointer class for automatic garbage collection.
void char ipfint ipfint ipfint * k
Definition: IpBlas.cpp:44
Ordinal size_type
The type of Array sizes and capacities.
int i
Definition: parse.c:193
RCP< ParameterList > parameterList()
Nonmember constructor.
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...

◆ TEUCHOS_UNIT_TEST() [136/224]

Teuchos::TEUCHOS_UNIT_TEST ( RCPNodeHandle  ,
remove_RCPNode_missing_node   
)

Definition at line 305 of file RCPNodeHandle_UnitTests.cpp.

306 {
307  SET_RCPNODE_TRACING();
308  RCPNode *node = basicRCPNode<A>(true);
309  TEST_THROW(RCPNodeTracer::removeRCPNode(node), std::logic_error);
310  deleteRCPNode(&node);
311 }
void deleteRCPNode(RCPNode **node)
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [137/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
create   
)

Definition at line 306 of file ObjectBuilder_UnitTests.cpp.

306  {
307  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>("Foo", "Foo Type");
308  TEST_EQUALITY_CONST( ob->create("None"), null ); // 7.
309  TEST_EQUALITY_CONST( ob->create(), null ); // 1.
310  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
311  ob->setObjectFactory(abstractFactoryStd<Foo,FooB>(),"Foo B");
312  ob->setObjectFactory(abstractFactoryStd<Foo,FooC>(),"Foo C");
313  out << "op.getValidParamters():\n";
315  const RCP<ParameterList> pl = parameterList();
316  pl->setParameters(*ob->getValidParameters());
317  pl->set("Foo Type","None");
318  ob->setParameterList(pl);
319  TEST_EQUALITY_CONST( ob->create(), null ); // 2.
320  pl->set("Foo Type", "Foo B");
321  pl->sublist("Foo B").set("String","BB");
322  pl->sublist("Foo C").set("String","CC");
323  {
324  const RCP<Foo> foo = ob->create();
325  const RCP<FooB> fooB = rcp_dynamic_cast<FooB>(foo,false);
326  TEST_EQUALITY_CONST( is_null(fooB), false ); // 3.
327  TEST_EQUALITY_CONST( foo->getString(), "BB" ); // 5a.
328  }
329  ob->unsetParameterList();
330  {
331  const RCP<Foo> foo = ob->create();
332  const RCP<FooC> fooC = rcp_dynamic_cast<FooC>(foo,false);
333  TEST_EQUALITY_CONST( is_null(fooC), false ); // 3a.
334  TEST_EQUALITY_CONST( foo->getString(), "C" ); // 5.
335  }
336  {
337  const RCP<Foo> foo = ob->create("Foo A");
338  const RCP<FooA> fooA = rcp_dynamic_cast<FooA>(foo,false);
339  TEST_EQUALITY_CONST( is_null(fooA), false ); // 4.
340  }
341  ob->setParameterList(pl);
342  {
343  const RCP<Foo> foo = ob->create("Foo A");
344  const RCP<FooA> fooA = rcp_dynamic_cast<FooA>(foo,false);
345  TEST_EQUALITY_CONST( is_null(fooA), false ); // 4.
346  }
347  {
348  RCP<Foo> foo;
349  TEST_THROW( foo = ob->create("Foo D"), std::logic_error ); // 4a.
350  }
351  // 6. ???
352 }
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void printValidParameters(const ParameterListAcceptor &paramListAccpetor, std::ostream &out, const bool showDoc=true)
Pretty print the valid parameters from a ParameterListAccpetor object.
RCP< ParameterList > parameterList()
Nonmember constructor.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.

◆ TEUCHOS_UNIT_TEST() [138/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
post_iterate_forward_filter_even   
)

Definition at line 308 of file FilteredIterator_UnitTests.cpp.

309 {
310  typedef Array<int>::const_iterator citr_t;
311  Array<int> a = tuple<int>(1, 2, 3, 4);
312  FilteredIterator<citr_t,SelectEven<int> > itr(a.begin(), a.begin(), a.end());
313  FilteredIterator<citr_t,SelectEven<int> > itr_end(a.end(), a.begin(), a.end());
314  TEST_ITER_INEQUALITY(itr, itr_end);
315  ECHO(const int v0 = *itr++);
316  TEST_EQUALITY_CONST(v0, 2);
317  ECHO(const int v1 = *itr++);
318  TEST_EQUALITY_CONST(v1, 4);
319  TEST_ITER_EQUALITY(itr, itr_end);
320 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [139/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
set_int_twice_keep_validator   
)

Definition at line 309 of file ParameterList_UnitTests.cpp.

310 {
311  ParameterList pl;
312  ECHO(pl.setEntry("my int", ParameterEntry(as<int>(3), true, true, "Some doc", rcp(new DummyValidator))));
313  {
314  ECHO(const ParameterEntry& my_int_param = getConst(pl).getEntry("my int"));
315  TEST_INEQUALITY_CONST(rcp_dynamic_cast<const DummyValidator>(my_int_param.validator(), true), null);
316  }
317  TEST_EQUALITY_CONST(pl.get<int>("my int"), 3);
318  ECHO(pl.set("my int", 4));
319  TEST_EQUALITY_CONST(pl.get<int>("my int"), 4);
320  {
321  ECHO(const ParameterEntry& my_int_param = getConst(pl).getEntry("my int"));
322  TEST_INEQUALITY_CONST(rcp_dynamic_cast<const DummyValidator>(my_int_param.validator(), true), null);
323  }
324 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [140/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
post_iterate_forward_filter_odd   
)

Definition at line 323 of file FilteredIterator_UnitTests.cpp.

324 {
325  typedef Array<int>::const_iterator citr_t;
326  Array<int> a = tuple<int>(1, 2, 3, 4);
327  FilteredIterator<citr_t,SelectOdd<int> > itr(a.begin(), a.begin(), a.end());
328  FilteredIterator<citr_t,SelectOdd<int> > itr_end(a.end(), a.begin(), a.end());
329  TEST_ITER_INEQUALITY(itr, itr_end);
330  ECHO(const int v0 = *itr++);
331  TEST_EQUALITY_CONST(v0, 1);
332  ECHO(const int v1 = *itr++);
333  TEST_EQUALITY_CONST(v1, 3);
334  TEST_ITER_EQUALITY(itr, itr_end);
335 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [141/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
removeObj_idx_middle   
)

Definition at line 326 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

327 {
328  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
329  typedef SIOVOCB::OrdinalIndex OI;
330  typedef StringIndexedOrderedValueObjectContainer<OI>::ConstIterator ConstIterator;
331  ECHO(StringIndexedOrderedValueObjectContainer<OI> oc);
332  ECHO(oc.setObj("c", 1));
333  ECHO(oc.setObj("a", 2));
334  ECHO(oc.setObj("b", 3));
335  TEST_EQUALITY_CONST(oc.numObjects(), 3);
336  TEST_EQUALITY_CONST(oc.numStorage(), 3);
337  ECHO(const OI &c = *oc.getObjPtr("c"));
338  ECHO(oc.removeObj(1));
339  TEST_EQUALITY(&c, oc.getObjPtr("c").get());
340  ECHO(ConstIterator itr = oc.begin());
341  TEST_EQUALITY_CONST(oc.numObjects(), 2);
342  TEST_EQUALITY_CONST(oc.numStorage(), 3);
343  TEST_EQUALITY_CONST(itr->first, "c");
344  TEST_EQUALITY_CONST(itr->second.idx, 1);
345  TEST_EQUALITY_CONST(itr->isActive(), true);
346  ECHO(++itr);
347  TEST_EQUALITY_CONST(itr->first, "b");
348  TEST_EQUALITY_CONST(itr->second.idx, 3);
349  TEST_EQUALITY_CONST(itr->isActive(), true);
350  ECHO(++itr);
351  TEST_ITER_EQUALITY(itr, oc.end());
352 }
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
size_t jm_callbacks * c
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [142/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
set_get_char_str   
)

Definition at line 327 of file ParameterList_UnitTests.cpp.

328 {
329  ParameterList pl;
330 
331  ECHO(char dummy_str_1[] = "dummy str 1");
332  ECHO(pl.set("dummy 1", dummy_str_1));
333  ECHO(const std::string dummy_1 = pl.get<std::string>("dummy 1"));
334  TEST_EQUALITY_CONST(dummy_1, "dummy str 1");
335 
336  ECHO(const char dummy_str_const_2[] = "dummy str 2");
337  ECHO(pl.set("dummy 2", dummy_str_const_2));
338  ECHO(const std::string dummy_2 = pl.get<std::string>("dummy 2"));
339  TEST_EQUALITY_CONST(dummy_2, "dummy str 2");
340 
341 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [143/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
pre_iterate_backward_filter_even   
)

Definition at line 338 of file FilteredIterator_UnitTests.cpp.

339 {
340  typedef Array<int>::const_iterator citr_t;
341  Array<int> a = tuple<int>(1, 2, 3, 4);
342  FilteredIterator<citr_t,SelectEven<int> > itr(a.end(), a.begin(), a.end());
343  FilteredIterator<citr_t,SelectEven<int> > itr_begin(a.begin(), a.begin(), a.end());
344  ECHO(--itr);
345  TEST_EQUALITY_CONST(*itr, 4);
346  ECHO(--itr);
347  TEST_EQUALITY_CONST(*itr, 2);
348  TEST_ITER_EQUALITY(itr, itr_begin);
349 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [144/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
testVisualDeps   
)

Testing all the visual dependencies

Definition at line 340 of file Dependencies_UnitTests.cpp.

340  {
341  RCP<ParameterList> My_deplist = RCP<ParameterList>(new ParameterList);
342  RCP<DependencySheet> depSheet1 =
343  RCP<DependencySheet>(new DependencySheet);
344  /*
345  * Two Simple NumberVisualDependency test
346  */
347 
348  ParameterList
349  simpleNumDepTestList = My_deplist->sublist(
350  "NumberVisual Dependency List (double)",
351  false,
352  "Number visual Dependency testing list"
353  );
354 
355  simpleNumDepTestList.set("Temperature",101.0);
356  simpleNumDepTestList.set("Cheese to Fondue", "Swiss", "The cheese to fondue");
357  simpleNumDepTestList.set("reverse param", "hello");
358 
359  RCP<NumberVisualDependency<double> > simpleNumDep =
360  RCP<NumberVisualDependency<double> >(
361  new NumberVisualDependency<double>(
362  simpleNumDepTestList.getEntryRCP("Temperature"),
363  simpleNumDepTestList.getEntryRCP("Cheese to Fondue"),
364  true
365  )
366  );
367  RCP<NumberVisualDependency<double> > reverseNumDep =
368  RCP<NumberVisualDependency<double> >(
369  new NumberVisualDependency<double>(
370  simpleNumDepTestList.getEntryRCP("Temperature"),
371  simpleNumDepTestList.getEntryRCP("reverse param"),
372  false
373  )
374  );
375  depSheet1->addDependency(simpleNumDep);
376  depSheet1->addDependency(reverseNumDep);
377  simpleNumDep->evaluate();
378  reverseNumDep->evaluate();
379  TEST_ASSERT(simpleNumDep->isDependentVisible());
380  TEST_ASSERT(!reverseNumDep->isDependentVisible());
381  simpleNumDepTestList.set("Temperature",-1.0);
382  simpleNumDep->evaluate();
383  reverseNumDep->evaluate();
384  TEST_ASSERT(!simpleNumDep->isDependentVisible());
385  TEST_ASSERT(reverseNumDep->isDependentVisible());
386 
387 
388  /*
389  * complex Testing the NumberVisualDependency
390  */
391  ParameterList
392  doubleVisualDepList = My_deplist->sublist(
393  "NumberVisual Dependency List (double)",
394  false,
395  "Number visual Dependency testing list"
396  );
397 
398  doubleVisualDepList.set(
399  "Temperature",101.0, "The temperature of the fondue");
400  doubleVisualDepList.set(
401  "Cheese to Fondue", "Swiss", "The cheese to fondue");
402  doubleVisualDepList.set("reverse param", "hello");
403  RCP<SubtractionFunction<double> > fondueFunc = rcp(new
404  SubtractionFunction<double>(100));
405 
406  RCP<NumberVisualDependency<double> > fondueDep =
407  RCP<NumberVisualDependency<double> >(
408  new NumberVisualDependency<double>(
409  doubleVisualDepList.getEntryRCP("Temperature"),
410  doubleVisualDepList.getEntryRCP("Cheese to Fondue"),
411  true,
412  fondueFunc
413  )
414  );
415  RCP<NumberVisualDependency<double> > reverseFondueDep =
416  RCP<NumberVisualDependency<double> >(
417  new NumberVisualDependency<double>(
418  doubleVisualDepList.getEntryRCP("Temperature"),
419  doubleVisualDepList.getEntryRCP("reverse param"),
420  false,
421  fondueFunc
422  )
423  );
424  depSheet1->addDependency(fondueDep);
425  depSheet1->addDependency(reverseFondueDep);
426  fondueDep->evaluate();
427  reverseFondueDep->evaluate();
428  TEST_ASSERT(fondueDep->isDependentVisible());
429  TEST_ASSERT(!reverseFondueDep->isDependentVisible());
430  doubleVisualDepList.set("Temperature",99.0);
431  fondueDep->evaluate();
432  reverseFondueDep->evaluate();
433  TEST_ASSERT(!fondueDep->isDependentVisible());
434  TEST_ASSERT(reverseFondueDep->isDependentVisible());
435 
436  /*
437  * Testing the BoolVisualDependency
438  */
439  ParameterList&
440  boolVisDepList = My_deplist->sublist(
441  "Bool Visual Dependency List",
442  false,
443  "Bool Visual Dependency testing list."
444  );
445  boolVisDepList.set(
446  "ShowPrecs", true, "Whether or not to should the Preciondtioner list");
447  ParameterList
448  Prec_List0 = boolVisDepList.sublist(
449  "Preconditioner",false,"Sublist that defines the preconditioner.");
450  Prec_List0.set("Type", "ILU", "The tpye of preconditioner to use");
451  RCP<EnhancedNumberValidator<double> > droptolValidator =
452  rcp(new EnhancedNumberValidator<double>(0,10,1e-3));
453  Prec_List0.set(
454  "Drop Tolerance", 1e-3,
455  "The tolerance below which entries from the "
456  "factorization are left out of the factors.", droptolValidator);
457  RCP<BoolVisualDependency>
458  precDep1 = RCP<BoolVisualDependency>(
459  new BoolVisualDependency(
460  boolVisDepList.getEntryRCP("ShowPrecs"),
461  boolVisDepList.getEntryRCP("Preconditioner"),
462  true
463  )
464  );
465  depSheet1->addDependency(precDep1);
466  precDep1->evaluate();
467  TEST_ASSERT(precDep1->isDependentVisible());
468  boolVisDepList.set("ShowPrecs", false);
469  precDep1->evaluate();
470  TEST_ASSERT(!precDep1->isDependentVisible());
471 
472 
473 
474  /*
475  * Testing the StringVisualDepenency
476  */
477  ParameterList&
478  stringVisDepList = My_deplist->sublist(
479  "String Visual Dependency List",
480  false,
481  "String Visual Dependency testing list."
482  );
483  RCP<StringToIntegralParameterEntryValidator<int> >
484  favCheeseValidator = rcp(
485  new StringToIntegralParameterEntryValidator<int>(
486  tuple<std::string>( "Swiss", "American", "Cheder" ),
487  "Favorite Cheese"
488  )
489  );
490 
491  stringVisDepList.set("Favorite Cheese",
492  "American", "Your favorite type of cheese", favCheeseValidator);
493  RCP<EnhancedNumberValidator<int> >
494  swissValidator = rcp(new EnhancedNumberValidator<int>(0,10));
495  stringVisDepList.set("Swiss rating", 0,
496  "How you rate swiss on a scale of 1 to 10", swissValidator);
497  RCP<StringVisualDependency>
498  swissDep1 = RCP<StringVisualDependency>(
499  new StringVisualDependency(
500  stringVisDepList.getEntryRCP("Favorite Cheese"),
501  stringVisDepList.getEntryRCP("Swiss rating"),
502  "Swiss",
503  true
504  )
505  );
506  depSheet1->addDependency(swissDep1);
507  swissDep1->evaluate();
508  TEST_ASSERT(!swissDep1->isDependentVisible());
509  stringVisDepList.set("Favorite Cheese", "Swiss");
510  swissDep1->evaluate();
511  TEST_ASSERT(swissDep1->isDependentVisible());
512 
513  /*
514  * String Visual Tester with multiple values
515  */
516  ParameterList multiStringVisDepList = My_deplist->sublist(
517  "Multi String Visual Dependency List",
518  false
519  );
520  RCP<StringToIntegralParameterEntryValidator<int> >
521  favCheeseValidator2 = rcp(
522  new StringToIntegralParameterEntryValidator<int>(
523  tuple<std::string>( "Provalone", "Swiss", "American", "Cheder" ),
524  "Favorite Cheese"
525  )
526  );
527 
528  multiStringVisDepList.set(
529  "Favorite Cheese", "American",
530  "Your favorite type of cheese", favCheeseValidator2);
531  multiStringVisDepList.set("Swiss rating", 0,
532  "How you rate swiss on a scale of 1 to 10", swissValidator);
533  RCP<StringVisualDependency>
534  swissDep2 = RCP<StringVisualDependency>(
535  new StringVisualDependency(
536  multiStringVisDepList.getEntryRCP("Favorite Cheese"),
537  multiStringVisDepList.getEntryRCP("Swiss rating"),
538  tuple<std::string>("Swiss", "Cheder"),
539  true
540  )
541  );
542  depSheet1->addDependency(swissDep2);
543  swissDep2->evaluate();
544  TEST_ASSERT(!swissDep2->isDependentVisible());
545  multiStringVisDepList.set("Favorite Cheese", "Cheder");
546  swissDep2->evaluate();
547  TEST_ASSERT(swissDep2->isDependentVisible());
548 
549  /*
550  * Another test of the NumberVisualDependency.
551  */
552  ParameterList
553  numberVisDepList = My_deplist->sublist(
554  "Number Visual Dependency List",
555  false,
556  "Number Visual Dependency testing list."
557  );
558  numberVisDepList.set("Ice", 50, "Ice stuff");
559  numberVisDepList.set("Room Temp", 10, "Room temperature");
560  RCP<SubtractionFunction<int> > visFunc = rcp(new
561  SubtractionFunction<int>(32));
562  RCP<NumberVisualDependency<int> >
563  iceDep = RCP<NumberVisualDependency<int> >(
564  new NumberVisualDependency<int>(
565  numberVisDepList.getEntryRCP("Room Temp"),
566  numberVisDepList.getEntryRCP("Ice"),
567  true,
568  visFunc
569  )
570  );
571  depSheet1->addDependency(iceDep);
572  iceDep->evaluate();
573  TEST_ASSERT(!iceDep->isDependentVisible());
574  numberVisDepList.set("Room Temp", 33);
575  iceDep->evaluate();
576  TEST_ASSERT(iceDep->isDependentVisible());
577 
578  /*
579  * Test condition visual dependency
580  */
581  RCP<ParameterList> conVisDepList = sublist(
582  My_deplist,"Condition Visual Dependency List", false);
583  conVisDepList->set("double param", 4.0, "double parameter");
584  conVisDepList->set("bool param", true, "bool parameter");
585  conVisDepList->set("string param", "blah", "a string parameter");
586  RCP<NumberCondition<double> > numberCon =
587  rcp( new NumberCondition<double>(
588  conVisDepList->getEntryRCP("double param")));
589  RCP<BoolCondition> boolCon =
590  rcp(new BoolCondition(conVisDepList->getEntryRCP("bool param")));
591  Condition::ConstConditionList conList =
592  tuple<RCP<const Condition> >(numberCon, boolCon);
593  RCP<AndCondition> andCon = rcp(new AndCondition(conList));
594  RCP<ConditionVisualDependency> conVisDep =
595  rcp(new ConditionVisualDependency(
596  andCon, conVisDepList->getEntryRCP("string param"), true));
597  depSheet1->addDependency(conVisDep);
598  conVisDep->evaluate();
599  TEST_ASSERT(conVisDep->isDependentVisible());
600  conVisDepList->set("bool param", false);
601  conVisDep->evaluate();
602  TEST_ASSERT(!conVisDep->isDependentVisible());
603 }
RCP< DependencySheet > depSheet1
RCP< AndCondition > andCon
void e()
Condition::ConstConditionList conList
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
RCP< BoolCondition > boolCon
TEST_ASSERT(nonnull(readInCon))
RCP< ParameterList > sublist(const RCP< ParameterList > &paramList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
Return a RCP to a sublist in another RCP-ed parameter list.
RCP< NumberCondition< int > > numberCon
Definition: gkregex.c:113
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [145/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
set_get_string   
)

Definition at line 344 of file ParameterList_UnitTests.cpp.

345 {
346  ParameterList pl;
347 
348  ECHO(const std::string dummy_str = "dummy str");
349  ECHO(pl.set("my str", dummy_str));
350  ECHO(const std::string my_str = pl.get<std::string>("my str"));
351  TEST_EQUALITY_CONST(my_str, "dummy str");
352 
353 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [146/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
pre_iterate_backward_filter_odd   
)

Definition at line 352 of file FilteredIterator_UnitTests.cpp.

353 {
354  typedef Array<int>::const_iterator citr_t;
355  Array<int> a = tuple<int>(1, 2, 3, 4);
356  FilteredIterator<citr_t,SelectOdd<int> > itr(a.end(), a.begin(), a.end());
357  FilteredIterator<citr_t,SelectOdd<int> > itr_begin(a.begin(), a.begin(), a.end());
358  ECHO(--itr);
359  TEST_EQUALITY_CONST(*itr, 3);
360  ECHO(--itr);
361  TEST_EQUALITY_CONST(*itr, 1);
362  TEST_ITER_EQUALITY(itr, itr_begin);
363 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [147/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
removeObj_key_middle   
)

Definition at line 355 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

356 {
357  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
358  typedef SIOVOCB::OrdinalIndex OI;
359  typedef StringIndexedOrderedValueObjectContainer<OI>::ConstIterator ConstIterator;
360  ECHO(StringIndexedOrderedValueObjectContainer<OI> oc);
361  ECHO(oc.setObj("c", 1));
362  ECHO(oc.setObj("a", 2));
363  ECHO(oc.setObj("b", 3));
364  TEST_EQUALITY_CONST(oc.numObjects(), 3);
365  TEST_EQUALITY_CONST(oc.numStorage(), 3);
366  ECHO(const OI &c = *oc.getObjPtr("c"));
367  ECHO(oc.removeObj("a"));
368  TEST_EQUALITY(&c, oc.getObjPtr("c").get());
369  TEST_EQUALITY_CONST(oc.numObjects(), 2);
370  TEST_EQUALITY_CONST(oc.numStorage(), 3);
371  ECHO(ConstIterator itr = oc.begin());
372  TEST_EQUALITY_CONST(itr->first, "c");
373  TEST_EQUALITY_CONST(itr->second.idx, 1);
374  TEST_EQUALITY_CONST(itr->isActive(), true);
375  ECHO(++itr);
376  TEST_EQUALITY_CONST(itr->first, "b");
377  TEST_EQUALITY_CONST(itr->second.idx, 3);
378  TEST_EQUALITY_CONST(itr->isActive(), true);
379  ECHO(++itr);
380  TEST_ITER_EQUALITY(itr, oc.end());
381 }
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
size_t jm_callbacks * c
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [148/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_nonexisting_param   
)

Definition at line 356 of file ParameterList_UnitTests.cpp.

357 {
358  ParameterList pl;
359  TEST_THROW(pl.getEntry("Does not exist 1"), Exceptions::InvalidParameterName);
360  TEST_THROW(pl.get<int>("Does not exist 2"), Exceptions::InvalidParameterName);
361  TEST_THROW(getConst(pl).get<int>("Does not exist 3"), Exceptions::InvalidParameterName);
362  TEST_EQUALITY(pl.getPtr<int>("Does not exist 4"), static_cast<int*>(0));
363  TEST_EQUALITY(getConst(pl).getPtr<int>("Does not exist 5"), static_cast<const int*>(0));
364  ECHO(char raw_str[] = "dummy");
365  TEST_EQUALITY_CONST(pl.get("Does not exist 6", raw_str), "dummy");
366  ECHO(const char raw_c_str[] = "dummy");
367  TEST_EQUALITY_CONST(pl.get("Does not exist 7", raw_c_str), "dummy");
368  ECHO(const std::string str = "dummy");
369  TEST_EQUALITY_CONST(pl.get("Does not exist 8", str), "dummy");
370  TEST_THROW(pl.getEntry("Does not exist 9"), Exceptions::InvalidParameterName);
371  TEST_THROW(getConst(pl).getEntry("Does not exist 10"), Exceptions::InvalidParameterName);
372  TEST_EQUALITY(pl.getEntryPtr("Does not exist 11"), static_cast<ParameterEntry*>(0));
373  TEST_EQUALITY(getConst(pl).getEntryPtr("Does not exist 12"), static_cast<const ParameterEntry*>(0));
374  TEST_EQUALITY(pl.getEntryRCP("Does not exist 13"), RCP<ParameterEntry>());
375  TEST_EQUALITY(getConst(pl).getEntryRCP("Does not exist 14"), RCP<const ParameterEntry>());
376 }
char * str
Definition: lp_lib.h:958
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [149/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
setParameterList   
)

Definition at line 365 of file ObjectBuilder_UnitTests.cpp.

365  {
366  RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>();
367  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
368  RCP<ParameterList> pl = null;
369  TEST_NOTHROW( ob->setParameterList(pl) );
370  pl = parameterList();
371  TEST_NOTHROW( ob->setParameterList(pl) );
372  pl->set("Hello","World");
373  TEST_THROW( ob->setParameterList(pl), std::logic_error ); // 1.
374 #ifdef TEUCHOS_DEBUG
375  TEST_THROW( ob->unsetParameterList(), std::logic_error ); // 2.
376  TEST_THROW( ob->create(), std::logic_error ); // 3.
377  TEST_THROW( ob = null, std::logic_error ); // 4.
378 #else // TEUCHOS_DEBUG
379  TEST_NOTHROW( ob->unsetParameterList() );
380  RCP<Foo> foo;
381  TEST_NOTHROW( foo = ob->create() );
382  const RCP<FooA> fooA = rcp_dynamic_cast<FooA>(foo,false);
383  TEST_EQUALITY_CONST( is_null(fooA), false );
384  TEST_NOTHROW( ob = null );
385 #endif // TEUCHOS_DEBUG
386 }
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
RCP< ParameterList > parameterList()
Nonmember constructor.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [150/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
post_iterate_backward_filter_even   
)

Definition at line 366 of file FilteredIterator_UnitTests.cpp.

367 {
368  typedef Array<int>::const_iterator citr_t;
369  Array<int> a = tuple<int>(1, 2, 3, 4);
370  FilteredIterator<citr_t,SelectEven<int> > itr(a.end(), a.begin(), a.end());
371  FilteredIterator<citr_t,SelectEven<int> > itr_begin(a.begin(), a.begin(), a.end());
372  ECHO(--itr);
373  ECHO(const int v0 = *itr--);
374  TEST_EQUALITY_CONST(v0, 4);
375  ECHO(const int v1 = *itr);
376  TEST_EQUALITY_CONST(v1, 2);
377  TEST_ITER_EQUALITY(itr, itr_begin);
378 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [151/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Conditions  ,
ConditionSerializationExceptions   
)

Definition at line 378 of file Condition_Serialization_UnitTests.cpp.

378  {
379  ConditionXMLConverterDB::printKnownConverters(out);
380  RCP<DependencySheet> depSheet = rcp(new DependencySheet);
381 
382 
383  TEST_THROW(RCP<ParameterList> missingParameterList =
385  "MissingParameterEntryDefinition.xml", depSheet),
386  MissingParameterEntryDefinitionException);
387 
388  RCP<ParameterEntry> notInListParam = rcp(new ParameterEntry(3.0));
389  RCP<NumberCondition<double> > doubleCon =
390  rcp(new NumberCondition<double>(notInListParam));
391 
392  NumberConditionConverter<double> doubleConConverter;
393  XMLParameterListWriter::EntryIDsMap emptyMap;
394  XMLObject toWriteTo;
395  TEST_THROW(doubleConConverter.fromConditiontoXML(doubleCon, emptyMap),
396  MissingParameterEntryDefinitionException);
397 
398  TEST_THROW(RCP<ParameterList> missingValuesList =
400  "MissingValuesTag.xml", depSheet),
401  MissingValuesTagException);
402 
403 
404 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > getParametersFromXmlFile(const std::string &xmlFileName)
Reads XML parameters from a file and return them in a new parameter list.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [152/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_existing_incorrect_type   
)

Definition at line 379 of file ParameterList_UnitTests.cpp.

380 {
381  ParameterList pl;
382  pl.set("my int", 4);
383  TEST_THROW(pl.get<double>("my int"), Exceptions::InvalidParameterType);
384  // ToDo: Assert the contents of the error message
385 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [153/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
post_iterate_backward_filter_odd   
)

Definition at line 381 of file FilteredIterator_UnitTests.cpp.

382 {
383  typedef Array<int>::const_iterator citr_t;
384  Array<int> a = tuple<int>(1, 2, 3, 4);
385  FilteredIterator<citr_t,SelectOdd<int> > itr(a.end(), a.begin(), a.end());
386  FilteredIterator<citr_t,SelectOdd<int> > itr_begin(a.begin(), a.begin(), a.end());
387  ECHO(--itr);
388  ECHO(const int v0 = *itr--);
389  TEST_EQUALITY_CONST(v0, 3);
390  ECHO(const int v1 = *itr);
391  TEST_EQUALITY_CONST(v1, 1);
392  TEST_ITER_EQUALITY(itr, itr_begin);
393 }
ArrayRCP< const int > const_iterator
The type of a const forward iterator.
struct a_s a
Definition: IpBlas.cpp:40
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [154/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
removeObj_idx_last   
)

Definition at line 384 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

385 {
386  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
387  typedef SIOVOCB::OrdinalIndex OI;
388  typedef StringIndexedOrderedValueObjectContainer<OI>::ConstIterator ConstIterator;
389  ECHO(StringIndexedOrderedValueObjectContainer<OI> oc);
390  ECHO(oc.setObj("c", 1));
391  ECHO(oc.setObj("a", 2));
392  ECHO(oc.setObj("b", 3));
393  TEST_EQUALITY_CONST(oc.numObjects(), 3);
394  TEST_EQUALITY_CONST(oc.numStorage(), 3);
395  ECHO(const OI &a = *oc.getObjPtr("a"));
396  ECHO(oc.removeObj(2));
397  TEST_EQUALITY_CONST(oc.numObjects(), 2);
398  TEST_EQUALITY_CONST(oc.numStorage(), 3);
399  TEST_EQUALITY(&a, oc.getObjPtr("a").get());
400  ECHO(ConstIterator itr = oc.begin());
401  TEST_EQUALITY_CONST(itr->first, "c");
402  TEST_EQUALITY_CONST(itr->second.idx, 1);
403  TEST_EQUALITY_CONST(itr->isActive(), true);
404  ECHO(++itr);
405  TEST_EQUALITY_CONST(itr->first, "a");
406  TEST_EQUALITY_CONST(itr->second.idx, 2);
407  TEST_EQUALITY_CONST(itr->isActive(), true);
408  ECHO(++itr);
409  TEST_ITER_EQUALITY(itr, oc.end());
410 }
struct a_s a
Definition: IpBlas.cpp:40
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [155/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
getPtr   
)

Definition at line 388 of file ParameterList_UnitTests.cpp.

389 {
390  ParameterList pl;
391  pl.set("my int", 4);
392  TEST_EQUALITY_CONST(pl.getPtr<int>("Does not Exist"), static_cast<int*>(0));
393  TEST_INEQUALITY_CONST(pl.getPtr<int>("my int"), static_cast<int*>(0));
394  TEST_EQUALITY_CONST(*pl.getPtr<int>("my int"), 4);
395  TEST_EQUALITY_CONST(pl.getPtr<double>("my int"), static_cast<double*>(0));
396  TEST_EQUALITY_CONST(getConst(pl).getPtr<int>("Does not Exist"), static_cast<const int*>(0));
397  TEST_INEQUALITY_CONST(getConst(pl).getPtr<int>("my int"), static_cast<int*>(0));
398  TEST_EQUALITY_CONST(*getConst(pl).getPtr<int>("my int"), 4);
399  TEST_EQUALITY_CONST(getConst(pl).getPtr<double>("my int"), static_cast<const double*>(0));
400 }
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [156/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validators  ,
boolValidator   
)

Definition at line 395 of file Validator_UnitTest.cpp.

396 {
397  RCP<ParameterList> userList = rcp(new ParameterList("User List"));
398  RCP<ParameterList> validList = rcp(new ParameterList("Valid List"));
399 
400  // first without validator - accepts only true/false
401  validList->set( "justBool", false, "documentation" );
402  TEST_NOTHROW(userList->set( "justBool", false));
403  TEST_NOTHROW(userList->validateParameters(*validList));
404  TEST_NOTHROW(userList->set( "justBool", true));
405  TEST_NOTHROW(userList->validateParameters(*validList));
406  // this will not validate because we did not add a bool validator
407  TEST_NOTHROW(userList->set( "justBool", "true"));
408  TEST_THROW(userList->validateParameters(*validList),
409  Exceptions::InvalidParameterType);
410  // this will not validate because we did not add a bool validator
411  TEST_NOTHROW(userList->set( "justBool", "false"));
412  TEST_THROW(userList->validateParameters(*validList),
413  Exceptions::InvalidParameterType);
414 
415  // now with BoolParameterEntryValidator validator
416  // accepts true/false/"true"/"false"
417  RCP<Teuchos::BoolParameterEntryValidator> boolValidator =
419  userList = rcp(new ParameterList("User List")); // make a new list
420  validList = rcp(new ParameterList("Valid List")); // make a new list
421  validList->set( "boolOrString", false, "documentation", boolValidator );
422  TEST_NOTHROW(userList->set( "boolOrString", false));
423  TEST_NOTHROW(userList->validateParameters(*validList));
424  TEST_NOTHROW(userList->set( "boolOrString", true));
425  TEST_NOTHROW(userList->validateParameters(*validList));
426  // this will validate because we added a bool validator
427  TEST_NOTHROW(userList->set( "boolOrString", "true"));
428  TEST_NOTHROW(userList->validateParameters(*validList));
429  // this will validate because we added a bool validator
430  TEST_NOTHROW(userList->set( "boolOrString", "false"));
431  TEST_NOTHROW(userList->validateParameters(*validList));
432  // but only "false" and "true" work - anything else will not validate
433  TEST_NOTHROW(userList->set( "boolOrString", "falsex")); // sets ok
434  TEST_THROW(userList->validateParameters(*validList), // but throws
435  Exceptions::InvalidParameterType);
436 
437  // now with BoolParameterEntryValidator validator
438  // but consider what happens if we created it using "false" instead of false
439  // this should still work identically to the previous case
440  userList = rcp(new ParameterList("User List")); // make a new list
441  validList = rcp(new ParameterList("Valid List")); // make a new list
442  validList->set( "boolOrString", "false", "documentation", boolValidator );
443  TEST_NOTHROW(userList->set( "boolOrString", false));
444  TEST_NOTHROW(userList->validateParameters(*validList));
445  TEST_NOTHROW(userList->set( "boolOrString", true ));
446  TEST_NOTHROW(userList->validateParameters(*validList));
447  // this will validate because we added a bool validator
448  TEST_NOTHROW(userList->set( "boolOrString", "true"));
449  TEST_NOTHROW(userList->validateParameters(*validList));
450  // this will validate because we added a bool validator
451  TEST_NOTHROW(userList->set( "boolOrString", "false"));
452  TEST_NOTHROW(userList->validateParameters(*validList));
453  // but only "false" and "true" work - anything else will not validate
454  TEST_NOTHROW(userList->set( "boolOrString", "falsex")); // sets ok
455  TEST_THROW(userList->validateParameters(*validList), // but throws
456  Exceptions::InvalidParameterType);
457 
458  // do another test using validateParametersAndSetDefaults
459  userList = rcp(new ParameterList("User List")); // make a new list
460  validList = rcp(new ParameterList("Valid List")); // make a new list
461  // Default values for parameters are bool
462  validList->set("boolOne", true, "doc", boolValidator);
463  validList->set("boolTwo", false, "doc", boolValidator);
464  bool defOne = validList->getEntry("boolOne").getValue(&defOne);
465  bool defTwo = validList->getEntry("boolTwo").getValue(&defTwo);
466 
467  // Create user parameter list
468  userList->set("boolOne", false); // User can provide bool value...
469  userList->set("boolTwo", "true"); // or string "true"/"false"
470  TEST_NOTHROW(userList->validateParametersAndSetDefaults(*validList));
471 }
Standard implementation of a BoolParameterEntryValidator that accepts bool values (true/false) or str...
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [157/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
iterate_forward_past_end_throw   
)

Definition at line 399 of file FilteredIterator_UnitTests.cpp.

400 {
401  // Need to use an unchecked iterator to make sure class thows
402  int a_raw = 1;
403  FilteredIterator<int*,SelectAll<int> > itr_end((&a_raw)+1, &a_raw, (&a_raw)+1);
404  FilteredIterator<int*,SelectAll<int> > itr = itr_end;
405  TEST_THROW(++itr, RangeError);
406  TEST_ITER_EQUALITY(itr, itr_end);
407  TEST_THROW(itr++, RangeError);
408  TEST_ITER_EQUALITY(itr, itr_end);
409 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [158/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
getParameterList   
)

Definition at line 399 of file ObjectBuilder_UnitTests.cpp.

399  {
400  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>();
401  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
402  const RCP<const ParameterList> pl = ob->getParameterList();
403  TEST_EQUALITY_CONST( is_null(pl), true ); // 1.
404  const RCP<ParameterList> nonconstPL = parameterList();
405  nonconstPL->set("Object Type","None");
406  TEST_NOTHROW( ob->setParameterList(nonconstPL) );
407  {
408  const RCP<const ParameterList> newPL = ob->getParameterList();
409  TEST_EQUALITY_CONST( nonconstPL.get(), newPL.get() ); // 2.
410  }
411 }
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
RCP< ParameterList > parameterList()
Nonmember constructor.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [159/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
getEntryRCP   
)

Definition at line 403 of file ParameterList_UnitTests.cpp.

404 {
405  ParameterList pl;
406  pl.set("my int", 4);
407  TEST_EQUALITY_CONST(pl.getEntryRCP("Does not Exist"), null);
408  TEST_INEQUALITY_CONST(pl.getEntryRCP("my int"), null);
409  TEST_EQUALITY_CONST(pl.getEntryRCP("my int")->getValue<int>(0), 4);
410  TEST_EQUALITY_CONST(getConst(pl).getEntryRCP("Does not Exist"), null);
411  TEST_INEQUALITY_CONST(getConst(pl).getEntryRCP("my int"), null);
412  TEST_EQUALITY_CONST(getConst(pl).getEntryRCP("my int")->getValue<int>(0), 4);
413 }
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [160/224]

Teuchos::TEUCHOS_UNIT_TEST ( FilteredIterator  ,
iterate_backward_past_begin_throw   
)

Definition at line 412 of file FilteredIterator_UnitTests.cpp.

413 {
414  // Need to use an unchecked iterator to make sure class thows
415  int a_raw = 1;
416  FilteredIterator<int*,SelectAll<int> > itr_begin(&a_raw, &a_raw, (&a_raw)+1);
417  FilteredIterator<int*,SelectAll<int> > itr = itr_begin;
418  TEST_THROW(--itr, RangeError);
419  TEST_ITER_EQUALITY(itr, itr_begin);
420  TEST_THROW(itr--, RangeError);
421  TEST_ITER_EQUALITY(itr, itr_begin);
422 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [161/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
removeObj_key_last   
)

Definition at line 413 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

414 {
415  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
416  typedef SIOVOCB::OrdinalIndex OI;
417  typedef StringIndexedOrderedValueObjectContainer<OI>::ConstIterator ConstIterator;
418  ECHO(StringIndexedOrderedValueObjectContainer<OI> oc);
419  ECHO(oc.setObj("c", 1));
420  ECHO(oc.setObj("a", 2));
421  ECHO(oc.setObj("b", 3));
422  TEST_EQUALITY_CONST(oc.numObjects(), 3);
423  TEST_EQUALITY_CONST(oc.numStorage(), 3);
424  ECHO(const OI &a = *oc.getObjPtr("a"));
425  ECHO(oc.removeObj("b"));
426  TEST_EQUALITY_CONST(oc.numObjects(), 2);
427  TEST_EQUALITY_CONST(oc.numStorage(), 3);
428  TEST_EQUALITY(&a, oc.getObjPtr("a").get());
429  ECHO(ConstIterator itr = oc.begin());
430  TEST_EQUALITY_CONST(itr->first, "c");
431  TEST_EQUALITY_CONST(itr->second.idx, 1);
432  TEST_EQUALITY_CONST(itr->isActive(), true);
433  ECHO(++itr);
434  TEST_EQUALITY_CONST(itr->first, "a");
435  TEST_EQUALITY_CONST(itr->second.idx, 2);
436  TEST_EQUALITY_CONST(itr->isActive(), true);
437  ECHO(++itr);
438  TEST_ITER_EQUALITY(itr, oc.end());
439 }
struct a_s a
Definition: IpBlas.cpp:40
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [162/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
getNonconstParameterList   
)

Definition at line 414 of file ObjectBuilder_UnitTests.cpp.

414  {
415  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>();
416  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
417  RCP<ParameterList> pl = ob->getNonconstParameterList();
418  TEST_EQUALITY_CONST( is_null(pl), true );
419  pl = parameterList();
420  pl->set("Object Type","None");
421  TEST_NOTHROW( ob->setParameterList(pl) );
422  {
423  RCP<ParameterList> newPL = null;
424  newPL = ob->getNonconstParameterList();
425  TEST_EQUALITY_CONST( pl.get(), newPL.get() );
426  }
427 }
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
RCP< ParameterList > parameterList()
Nonmember constructor.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [163/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_default_then_change   
)

Definition at line 421 of file ParameterList_UnitTests.cpp.

422 {
423  ParameterList pl;
424  ECHO(int &my_int = pl.get("my int", 3));
425  TEST_EQUALITY_CONST(my_int, 3);
426  TEST_EQUALITY_CONST(pl.get<int>("my int"), 3);
427  ECHO(my_int = 5);
428  TEST_EQUALITY_CONST(pl.get<int>("my int"), 5);
429 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [164/224]

Teuchos::TEUCHOS_UNIT_TEST ( TimeMonitor  ,
TimerLabelFiltering   
)

Definition at line 430 of file TimeMonitor_UnitTests.cpp.

431  {
432  using Teuchos::Array;
434  using Teuchos::parameterList;
435  using Teuchos::RCP;
436  using Teuchos::Time;
437  typedef Array<std::string>::size_type size_type;
438 
439  // Filters to use in the test.
440  Array<std::string> filters;
441  filters.push_back ("Foo:");
442  filters.push_back ("Bar:");
443  filters.push_back ("Baz:");
444 
445  // All the timer labels.
446  Array<std::string> labels;
447  labels.push_back ("Foo: timer 1");
448  labels.push_back ("Foo: timer 2");
449  labels.push_back ("Foo: timer 3");
450  labels.push_back ("Bar: timer 1");
451  labels.push_back ("Bar: timer 2");
452  labels.push_back ("Baz: timer 1");
453  labels.push_back ("Xyzzy");
454  labels.push_back ("This is not a pipe");
455  labels.push_back ("You should not see this");
456 
457  Array<Array<std::string> > outLabels (3);
458  // Label(s) that should be printed for filters[0]
459  outLabels[0].push_back ("Foo: timer 1");
460  outLabels[0].push_back ("Foo: timer 2");
461  outLabels[0].push_back ("Foo: timer 3");
462  // Label(s) that should be printed for filters[1]
463  outLabels[1].push_back ("Bar: timer 1");
464  outLabels[1].push_back ("Bar: timer 2");
465  // Label(s) that should be printed for filters[2]
466  outLabels[2].push_back ("Baz: timer 1");
467 
468  // Labels that should not be printed for any of the filters below.
469  Array<std::string> otherLabels;
470  otherLabels.push_back ("Xyzzy");
471  otherLabels.push_back ("This is not a pipe");
472  otherLabels.push_back ("You should not see this");
473 
474  Array<RCP<Time> > timers;
475  for (size_type i = 0; i < labels.size (); ++i) {
476  timers.push_back (TimeMonitor::getNewCounter (labels[i]));
477  }
478 
479  // The actual number of operations in the loop is proportional to
480  // the cube of the loop length. Adjust the quantities below as
481  // necessary to ensure the timer reports a nonzero elapsed time
482  // for each of the invocations.
483  const size_t loopLength = 25;
484  for (int k = 0; k < 3; ++k) {
485  for (size_type i = 0; i < timers.size (); ++i) {
486  TimeMonitor timeMon (* timers[i]);
487  slowLoop (loopLength);
488  }
489  }
490 
491  try {
492  // FIXME (mfh 21 Aug 2012) We don't yet have a test ensuring that
493  // the filter only selects at the beginning of the timer label.
494 
495  // Test for each filter.
496  for (size_type i = 0; i < filters.size (); ++i) {
497  { // Default (tabular) output format.
498  std::ostringstream oss;
499  RCP<ParameterList> reportParams =
500  parameterList (* (TimeMonitor::getValidReportParameters ()));
501  TimeMonitor::report (oss, filters[i], reportParams);
502 
503  // Echo output to the FancyOStream out (which is a standard unit
504  // test argument). Output should only appear in "show all test
505  // details" mode.
506  out << oss.str () << std::endl;
507 
508  // Check whether the labels that were supposed to be printed
509  // were actually printed.
510  for (size_type j = 0; j < outLabels[i].size(); ++j) {
511  const size_t pos = oss.str ().find (outLabels[i][j]);
512  TEST_INEQUALITY(pos, std::string::npos);
513  }
514 
515  // Check whether the labels that were _not_ supposed to be
516  // printed were actually printed.
517  //
518  // First, check the labels that should only be printed with
519  // the other filters.
520  for (size_type ii = 0; ii < outLabels.size(); ++ii) {
521  if (ii != i) {
522  for (size_type j = 0; j < outLabels[ii].size(); ++j) {
523  const size_t pos = oss.str ().find (outLabels[ii][j]);
524  TEST_EQUALITY(pos, std::string::npos);
525  }
526  }
527  }
528  // Next, check the labels that should not be printed for any
529  // filters.
530  for (size_type j = 0; j < otherLabels.size(); ++j) {
531  const size_t pos = oss.str ().find (otherLabels[j]);
532  TEST_EQUALITY(pos, std::string::npos);
533  }
534  }
535 
536  { // YAML output, compact style.
537  std::ostringstream oss;
538  RCP<ParameterList> reportParams =
539  parameterList (* (TimeMonitor::getValidReportParameters ()));
540  reportParams->set ("Report format", "YAML");
541  reportParams->set ("YAML style", "compact");
542  TimeMonitor::report (oss, filters[i], reportParams);
543 
544  // Echo output to the FancyOStream out (which is a standard unit
545  // test argument). Output should only appear in "show all test
546  // details" mode.
547  out << oss.str () << std::endl;
548 
549  // Check whether the labels that were supposed to be printed
550  // were actually printed.
551  for (size_type j = 0; j < outLabels[i].size(); ++j) {
552  const size_t pos = oss.str ().find (outLabels[i][j]);
553  TEST_INEQUALITY(pos, std::string::npos);
554  }
555 
556  // Check whether the labels that were _not_ supposed to be
557  // printed were actually printed.
558  //
559  // First, check the labels that should only be printed with
560  // the other filters.
561  for (size_type ii = 0; ii < outLabels.size(); ++ii) {
562  if (ii != i) {
563  for (size_type j = 0; j < outLabels[ii].size(); ++j) {
564  const size_t pos = oss.str ().find (outLabels[ii][j]);
565  TEST_EQUALITY(pos, std::string::npos);
566  }
567  }
568  }
569  // Next, check the labels that should not be printed for any
570  // filters.
571  for (size_type j = 0; j < otherLabels.size(); ++j) {
572  const size_t pos = oss.str ().find (otherLabels[j]);
573  TEST_EQUALITY(pos, std::string::npos);
574  }
575  }
576 
577  { // YAML output, spacious style.
578  std::ostringstream oss;
579  RCP<ParameterList> reportParams =
580  parameterList (* (TimeMonitor::getValidReportParameters ()));
581  reportParams->set ("Report format", "YAML");
582  reportParams->set ("YAML style", "spacious");
583  TimeMonitor::report (oss, filters[i], reportParams);
584 
585  // Echo output to the FancyOStream out (which is a standard unit
586  // test argument). Output should only appear in "show all test
587  // details" mode.
588  out << oss.str () << std::endl;
589 
590  // Check whether the labels that were supposed to be printed
591  // were actually printed.
592  for (size_type j = 0; j < outLabels[i].size(); ++j) {
593  const size_t pos = oss.str ().find (outLabels[i][j]);
594  TEST_INEQUALITY(pos, std::string::npos);
595  }
596 
597  // Check whether the labels that were _not_ supposed to be
598  // printed were actually printed.
599  //
600  // First, check the labels that should only be printed with
601  // the other filters.
602  for (size_type ii = 0; ii < outLabels.size(); ++ii) {
603  if (ii != i) {
604  for (size_type j = 0; j < outLabels[ii].size(); ++j) {
605  const size_t pos = oss.str ().find (outLabels[ii][j]);
606  TEST_EQUALITY(pos, std::string::npos);
607  }
608  }
609  }
610  // Next, check the labels that should not be printed for any
611  // filters.
612  for (size_type j = 0; j < otherLabels.size(); ++j) {
613  const size_t pos = oss.str ().find (otherLabels[j]);
614  TEST_EQUALITY(pos, std::string::npos);
615  }
616  }
617  }
618  }
619  catch (...) {
620  // Make sure to clear the counters, so that they don't pollute
621  // the remaining tests. (The Teuchos unit test framework may
622  // catch any exceptions that the above code throws, but allow
623  // the remaining tests to continue.)
624  TimeMonitor::clearCounters ();
625  throw;
626  }
627 
628  // This sets up for the next unit test.
629  TimeMonitor::clearCounters ();
630  }
Wall-clock timer.
void __VACALL report(lprec *lp, int level, char *format,...)
Definition: lp_report.c:55
A list of parameters of arbitrary type.
int j
Definition: lp_lib.h:1070
Smart reference counting pointer class for automatic garbage collection.
void char ipfint ipfint ipfint * k
Definition: IpBlas.cpp:44
Ordinal size_type
The type of Array sizes and capacities.
int i
Definition: parse.c:193
RCP< ParameterList > parameterList()
Nonmember constructor.
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...

◆ TEUCHOS_UNIT_TEST() [165/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
remove_1   
)

Definition at line 432 of file ParameterList_UnitTests.cpp.

433 {
434  ParameterList pl;
435  TEST_EQUALITY_CONST(pl.numParams(), 0);
436  ECHO(pl.set("my int", 2));
437  TEST_EQUALITY_CONST(pl.numParams(), 1);
438  TEST_EQUALITY_CONST(pl.get<int>("my int"), 2);
439  ECHO(const bool param_was_removed_1 = pl.remove("my int"));
440  TEST_EQUALITY_CONST(param_was_removed_1, true);
441  TEST_EQUALITY_CONST(pl.numParams(), 0);
442  TEST_THROW(pl.get<int>("my int"), Exceptions::InvalidParameterName);
443  TEST_THROW(pl.remove("my int"), Exceptions::InvalidParameterName);
444  ECHO(const bool param_was_removed_2 = pl.remove("my int", false));
445  TEST_EQUALITY_CONST(param_was_removed_2, false);
446 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [166/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
unsetParameterList   
)

Definition at line 437 of file ObjectBuilder_UnitTests.cpp.

437  {
438  RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>();
439  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
440  const RCP<ParameterList> pl = parameterList();
441  pl->set("Object Type","None");
442  ob->setParameterList(pl);
443  RCP<Foo> foo = ob->create();
444  TEST_EQUALITY_CONST( is_null(foo), true );
445  RCP<ParameterList> newPL = ob->unsetParameterList();
446  TEST_EQUALITY_CONST( pl.get(), newPL.get() ); // 1a.
447  foo = ob->create();
448  const RCP<FooA> fooA = rcp_dynamic_cast<FooA>(foo,false);
449  TEST_EQUALITY_CONST( is_null(fooA), false ); // 1.
450  ob->setParameterList(pl);
451  pl->set("Hello","World");
452  newPL = null;
453 #ifdef TEUCHOS_DEBUG
454  TEST_THROW( newPL = ob->unsetParameterList(), std::logic_error ); // 2.
455  TEST_EQUALITY_CONST( is_null(newPL), true );
456  TEST_THROW( ob = null, std::logic_error );
457 #else // TEUCHOS_DEBUG
458  TEST_NOTHROW( newPL = ob->unsetParameterList() );
459  TEST_EQUALITY_CONST( pl.get(), newPL.get() ); // 1a.
460  TEST_NOTHROW( ob = null );
461 #endif // TEUCHOS_DEBUG
462 }
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
RCP< ParameterList > parameterList()
Nonmember constructor.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [167/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
getNonconstObjPtr_idx_invalid   
)

Definition at line 442 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

443 {
444  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
445  //typedef StringIndexedOrderedValueObjectContainer<int>::Iterator Iterator; // unused
446  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
447  ECHO(oc.setObj("a", 4));
448  TEST_EQUALITY_CONST(*oc.getNonconstObjPtr(0), 4);
449  TEST_THROW(oc.getNonconstObjPtr(-1), SIOVOCB::InvalidOrdinalIndexError);
450  TEST_THROW(oc.getNonconstObjPtr(1), SIOVOCB::InvalidOrdinalIndexError);
451  ECHO(oc.removeObj(0));
452  TEST_THROW(oc.getNonconstObjPtr(0), SIOVOCB::InvalidOrdinalIndexError);
453 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [168/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_nonexisting_sublist_default   
)

Definition at line 449 of file ParameterList_UnitTests.cpp.

450 {
451  ParameterList pl("Base");
452  ECHO(pl.sublist("my sublist"));
453  ECHO(const ParameterEntry &sublistParam = pl.getEntry("my sublist"));
454  TEST_EQUALITY_CONST(sublistParam.isUsed(), false);
455  TEST_EQUALITY_CONST(sublistParam.isList(), true);
456  TEST_EQUALITY_CONST(sublistParam.isDefault(), false);
457  TEST_EQUALITY_CONST(sublistParam.docString(), "");
458  TEST_EQUALITY_CONST(sublistParam.getValue<ParameterList>(0).name(), "Base->my sublist");
459 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [169/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
getObjPtr_idx_invalid   
)

Definition at line 456 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

457 {
458  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
459  //typedef StringIndexedOrderedValueObjectContainer<int>::Iterator Iterator; // unused
460  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
461  ECHO(oc.setObj("a", 4));
462  TEST_EQUALITY_CONST(*oc.getObjPtr(0), 4);
463  TEST_THROW(oc.getObjPtr(-1), SIOVOCB::InvalidOrdinalIndexError);
464  TEST_THROW(oc.getObjPtr(1), SIOVOCB::InvalidOrdinalIndexError);
465  ECHO(oc.removeObj(0));
466  TEST_THROW(oc.getObjPtr(0), SIOVOCB::InvalidOrdinalIndexError);
467 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [170/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_nonexisting_sublist_docString   
)

Definition at line 462 of file ParameterList_UnitTests.cpp.

463 {
464  ParameterList pl("Base");
465  ECHO(pl.sublist("my sublist", false, "My great sublist"));
466  ECHO(const ParameterEntry &sublistParam = pl.getEntry("my sublist"));
467  TEST_EQUALITY_CONST(sublistParam.isUsed(), false);
468  TEST_EQUALITY_CONST(sublistParam.isList(), true);
469  TEST_EQUALITY_CONST(sublistParam.isDefault(), false);
470  TEST_EQUALITY_CONST(sublistParam.docString(), "My great sublist");
471  TEST_EQUALITY_CONST(sublistParam.getValue<ParameterList>(0).name(), "Base->my sublist");
472 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [171/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
removeObj_idx_invalid   
)

Definition at line 470 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

471 {
472  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
473  //typedef StringIndexedOrderedValueObjectContainer<int>::Iterator Iterator; // unused
474  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
475  ECHO(oc.setObj("a", 4));
476  TEST_EQUALITY_CONST(*oc.getObjPtr(0), 4);
477  TEST_THROW(oc.removeObj(-1), SIOVOCB::InvalidOrdinalIndexError);
478  TEST_THROW(oc.removeObj(1), SIOVOCB::InvalidOrdinalIndexError);
479  TEST_EQUALITY_CONST(oc.numObjects(), 1);
480  ECHO(oc.removeObj(0));
481  TEST_EQUALITY_CONST(oc.numObjects(), 0);
482  TEST_THROW(oc.removeObj(0), SIOVOCB::InvalidOrdinalIndexError);
483 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [172/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
getValidParameters   
)

Definition at line 471 of file ObjectBuilder_UnitTests.cpp.

471  {
472  {
473  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>();
474  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
475  const RCP<ParameterList> pl = parameterList();
476  pl->set("Object Type","Foo B");
477  TEST_THROW( ob->setParameterList(pl), std::logic_error ); // 2.
478  }
479  {
480  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>();
481  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
482  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo B");
483  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo C");
484  const RCP<ParameterList> validPL = parameterList();
485  validPL->set("Object Type","Foo C");
486  validPL->sublist("Foo A").set("String","A");
487  validPL->sublist("Foo B").set("String","B");
488  validPL->sublist("Foo C").set("String","C");
489  Array<std::string> validObjectNames;
490  validObjectNames.push_back("None");
491  validObjectNames.push_back("Foo A");
492  validObjectNames.push_back("Foo B");
493  validObjectNames.push_back("Foo C");
494  const RCP<const StringToIntegralParameterEntryValidator<int> >
495  objectValidator = rcp(
496  new StringToIntegralParameterEntryValidator<int>(
497  validObjectNames,"Object Type"
498  )
499  );
500  validPL->set(
501  "Object Type","Foo C"
502  ,(std::string("Determines the type of Object object that will be built.\n")
503  + "The parameters for each Object Type are specified in this sublist"
504  ).c_str()
505  ,objectValidator
506  );
507  const RCP<const ParameterList> pl = ob->getValidParameters();
508  TEST_NOTHROW( pl->validateParameters(*validPL) ); // 4.
509  validPL->set("Object Type","Foo A");
510  TEST_NOTHROW( pl->validateParameters(*validPL) ); // 4.
511  validPL->set("Object Type","Foo B");
512  TEST_NOTHROW( pl->validateParameters(*validPL) ); // 4.
513  validPL->set("Object Type","None");
514  TEST_NOTHROW( pl->validateParameters(*validPL) ); // 4.
515  }
516 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
RCP< ParameterList > parameterList()
Nonmember constructor.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [173/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_nonexisting_sublist_mustAlreadyExist   
)

Definition at line 475 of file ParameterList_UnitTests.cpp.

476 {
477  ParameterList pl("Base");
478  TEST_THROW(pl.sublist("my sublist", true), Exceptions::InvalidParameterName);
479  // ToDo: Examine the actual structure of the error message
480 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [174/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validators  ,
stringValidator   
)

Definition at line 477 of file Validator_UnitTest.cpp.

478 {
479  RCP<ParameterList> stringList = rcp(new ParameterList("String List"));
480  Array<std::string> stringVals = tuple<std::string>("str1", "str2", "str3");
481  RCP<StringValidator> stringVali = rcp(new StringValidator(stringVals));
482  RCP<const Array<std::string> > valiVals = stringVali->validStringValues();
483  /*bool local_success = true;
484  for(int i =0; i<valiVals.size() ++i){
485  TEST_ARRAY_ELE_EQUALITY(*valiVals, i, stringVals[i]);
486  }
487  if (local_success) out << "passed\n";
488  else success = false;*/
489  TEST_COMPARE_ARRAYS(*valiVals, stringVals);
490  TEST_NOTHROW(stringList->set("String param1", "str1", "a string parameter", stringVali));
491  TEST_THROW(stringList->set("String param2", "not in list", "a string parameter", stringVali),
492  Exceptions::InvalidParameterValue);
493  TEST_THROW(stringList->set("int param", 5, "a int parameter", stringVali),
494  Exceptions::InvalidParameterType);
495 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [175/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_existing_sublist_nonsublist   
)

Definition at line 483 of file ParameterList_UnitTests.cpp.

484 {
485  ParameterList pl("Base");
486  ECHO(pl.set("my sublist", 1)); // Not a sublist!
487  TEST_THROW(pl.sublist("my sublist"), Exceptions::InvalidParameterType);
488  // ToDo: Examine the actual structure of the error message
489 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [176/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
getNonconstObjPtr_key_invalid   
)

Definition at line 486 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

487 {
488  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
489  //typedef StringIndexedOrderedValueObjectContainer<int>::Iterator Iterator; // unused
490  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
491  ECHO(oc.setObj("a", 4));
492  TEST_EQUALITY_CONST(*oc.getNonconstObjPtr("a"), 4);
493  TEST_THROW(oc.getNonconstObjPtr("does_not_exist"), SIOVOCB::InvalidKeyError);
494  ECHO(oc.removeObj("a"));
495  TEST_THROW(oc.getNonconstObjPtr("a"), SIOVOCB::InvalidKeyError);
496 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [177/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_existing_sublist_nonconst   
)

Definition at line 492 of file ParameterList_UnitTests.cpp.

493 {
494  ParameterList pl("Base");
495  ECHO(pl.sublist("my sublist").set("my int", 2));
496  ECHO(const int my_int = pl.sublist("my sublist").get<int>("my int"));
497  TEST_EQUALITY_CONST(my_int, 2);
498 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [178/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
getObjPtr_key_invalid   
)

Definition at line 499 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

500 {
501  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
502  //typedef StringIndexedOrderedValueObjectContainer<int>::Iterator Iterator; // unused
503  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
504  ECHO(oc.setObj("a", 4));
505  TEST_EQUALITY_CONST(*oc.getObjPtr("a"), 4);
506  TEST_THROW(oc.getObjPtr("does_not_exist"), SIOVOCB::InvalidKeyError);
507  ECHO(oc.removeObj("a"));
508  TEST_THROW(oc.getObjPtr("a"), SIOVOCB::InvalidKeyError);
509 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [179/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_existing_sublist_const   
)

Definition at line 501 of file ParameterList_UnitTests.cpp.

502 {
503  ParameterList pl("Base");
504  ECHO(pl.sublist("my sublist").set("my int", 2));
505  ECHO(const int my_int = getConst(pl).sublist("my sublist").get<int>("my int"));
506  TEST_EQUALITY_CONST(my_int, 2);
507 }
RCP< ParameterList > sublist(const RCP< ParameterList > &paramList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
Return a RCP to a sublist in another RCP-ed parameter list.
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [180/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validators  ,
fileNameValidator   
)

Definition at line 501 of file Validator_UnitTest.cpp.

502 {
503  RCP<ParameterList> fileNameList = rcp(new ParameterList("Filename List"));
504  RCP<FileNameValidator> fileNameVali = rcp(new FileNameValidator(true));
505  TEST_ASSERT(fileNameVali->fileMustExist());
506  fileNameVali->setFileMustExist(false);
507  TEST_ASSERT(!fileNameVali->fileMustExist());
508  TEST_NOTHROW(fileNameList->set("File name param", "../path", "file name parameter",
509  fileNameVali));
510  TEST_THROW(fileNameList->set("int param", 5, "int parameter", fileNameVali),
511  Exceptions::InvalidParameterType);
512  fileNameVali->setFileMustExist(true);
513  TEST_NOTHROW(fileNameList->set("file name param", "testFile.txt", "a file name", fileNameVali));
514  TEST_THROW(fileNameList->set("file name param", "doesntexist.txt", "a file name", fileNameVali),
515  Exceptions::InvalidParameterValue);
516 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [181/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_nonexisting_sublist_const   
)

Definition at line 510 of file ParameterList_UnitTests.cpp.

511 {
512  ParameterList pl("Base");
513  TEST_THROW(getConst(pl).sublist("my sublist"), Exceptions::InvalidParameterName);
514  // ToDo: Examine the actual structure of the error message
515 }
RCP< ParameterList > sublist(const RCP< ParameterList > &paramList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
Return a RCP to a sublist in another RCP-ed parameter list.
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [182/224]

Teuchos::TEUCHOS_UNIT_TEST ( StringIndexedOrderedValueObjectContainer  ,
removeObj_key_invalid   
)

Definition at line 512 of file StringIndexedOrderedValueObjectContainer_UnitTests.cpp.

513 {
514  typedef StringIndexedOrderedValueObjectContainerBase SIOVOCB;
515  //typedef StringIndexedOrderedValueObjectContainer<int>::Iterator Iterator; // unused
516  ECHO(StringIndexedOrderedValueObjectContainer<int> oc);
517  ECHO(oc.setObj("a", 4));
518  TEST_EQUALITY_CONST(*oc.getObjPtr("a"), 4);
519  TEST_THROW(oc.removeObj("does_not_exist"), SIOVOCB::InvalidKeyError);
520  TEST_EQUALITY_CONST(oc.numObjects(), 1);
521  ECHO(oc.removeObj("a"));
522  TEST_EQUALITY_CONST(oc.numObjects(), 0);
523  TEST_THROW(oc.removeObj("a"), SIOVOCB::InvalidKeyError);
524 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [183/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
get_existing_sublist_const_nonsublist   
)

Definition at line 518 of file ParameterList_UnitTests.cpp.

519 {
520  ParameterList pl("Base");
521  ECHO(pl.set("my sublist", 1)); // Not a sublist!
522  TEST_THROW(getConst(pl).sublist("my sublist"), Exceptions::InvalidParameterType);
523  // ToDo: Examine the actual structure of the error message
524 }
RCP< ParameterList > sublist(const RCP< ParameterList > &paramList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
Return a RCP to a sublist in another RCP-ed parameter list.
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [184/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validators  ,
arrayValidators   
)

Definition at line 522 of file Validator_UnitTest.cpp.

523 {
524 
525  /*
526  * Testing StringArrayValidator.
527  */
528  RCP<ParameterList> stringList = rcp(new ParameterList("String List"));
529  Array<std::string> stringVals = tuple<std::string>("str1", "str2", "str3");
530  RCP<StringValidator> stringVali = rcp(new StringValidator(stringVals));
531  RCP<ArrayStringValidator> stringArrayVali = rcp(new ArrayStringValidator(stringVali));
532  TEST_ASSERT(stringVali.get() == stringArrayVali->getPrototype().get());
533  Array<std::string> stringArray = tuple<std::string>("str2","str3","str1","str3","str2");
534  TEST_NOTHROW(stringList->set("String Array Param", stringArray, "string array parameter", stringArrayVali));
535  Array<std::string> badStringArray = tuple<std::string>("not valid","str3","str1","str3","str2");
536  TEST_THROW(stringList->set("String Array Param", badStringArray, "string array parameter", stringArrayVali),
537  Exceptions::InvalidParameterValue);
538  TEST_THROW(stringList->set("Int param", 5, "int parameter", stringArrayVali),
539  Exceptions::InvalidParameterType);
540  Array<long> longArray = tuple<long>((long)5,(long)5,(long)3);
541  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", stringArrayVali),
542  Exceptions::InvalidParameterType);
543 
544  /*
545  * Testing Int ArrayValidator.
546  */
547  RCP<ParameterList> intList = rcp(new ParameterList("Int List"));
548  RCP<EnhancedNumberValidator<int> > intVali = rcp(new EnhancedNumberValidator<int>(0, 10));
549  RCP<ArrayNumberValidator<int> > intArrayVali = rcp(new ArrayNumberValidator<int>(intVali));
550  TEST_ASSERT(intVali.get() == intArrayVali->getPrototype().get());
551  Array<int> intArray = tuple<int>(1,4,2,5);
552  TEST_NOTHROW(intList->set("int array param", intArray, "int array parameter", intArrayVali));
553  Array<int> intBadArray = tuple<int>(11,4,2,5);
554  TEST_THROW(intList->set("int bad array param", intBadArray, "int bad array parameter", intArrayVali),
555  Exceptions::InvalidParameterValue);
556  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", intArrayVali),
557  Exceptions::InvalidParameterType);
558 
559  /*
560  * Testing Short ArrayValidator.
561  */
562  RCP<ParameterList> shortList = rcp(new ParameterList("Short List"));
563  RCP<EnhancedNumberValidator<short> > shortVali =
564  rcp(new EnhancedNumberValidator<short>(0, 10));
565  RCP<ArrayNumberValidator<short> > shortArrayVali =
566  rcp(new ArrayNumberValidator<short>(shortVali));
567  TEST_ASSERT(shortVali.get() == shortArrayVali->getPrototype().get());
568  Array<short> shortArray = tuple<short>(1,4,2,5);
569  TEST_NOTHROW(shortList->set("short array param", shortArray, "short array parameter", shortArrayVali));
570  Array<short> shortBadArray = tuple<short>(11,4,2,5);
571  TEST_THROW(shortList->set("short bad array param", shortBadArray, "short bad array parameter", shortArrayVali),
572  Exceptions::InvalidParameterValue);
573  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", shortArrayVali),
574  Exceptions::InvalidParameterType);
575 
576  /*
577  * Testing Float ArrayValidator.
578  */
579  RCP<ParameterList> floatList = rcp(new ParameterList("Float List"));
580  RCP<EnhancedNumberValidator<float> > floatVali =
581  rcp(new EnhancedNumberValidator<float>(0.0, 10.0));
582  RCP<ArrayNumberValidator<float> > floatArrayVali =
583  rcp(new ArrayNumberValidator<float>(floatVali));
584  TEST_ASSERT(floatVali.get() == floatArrayVali->getPrototype().get());
585  Array<float> floatArray = tuple<float>(1.0,4.0,2.0,5.0);
586  TEST_NOTHROW(floatList->set("float array param", floatArray, "float array parameter", floatArrayVali));
587  Array<float> floatBadArray = tuple<float>(11.0,4.0,2.0,5.0);
588  TEST_THROW(floatList->set("float bad array param", floatBadArray, "float bad array parameter", floatArrayVali),
589  Exceptions::InvalidParameterValue);
590  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", floatArrayVali),
591  Exceptions::InvalidParameterType);
592 
593  /*
594  * Testing Double ArrayValidator.
595  */
596  RCP<ParameterList> doubleList = rcp(new ParameterList("Double List"));
597  RCP<EnhancedNumberValidator<double> > doubleVali =
598  rcp(new EnhancedNumberValidator<double>(0.0, 10.0));
599  RCP<ArrayNumberValidator<double> > doubleArrayVali =
600  rcp(new ArrayNumberValidator<double>(doubleVali));
601  TEST_ASSERT(doubleVali.get() == doubleArrayVali->getPrototype().get());
602  Array<double> doubleArray = tuple<double>(1.0,4.0,2.0,5.0);
603  TEST_NOTHROW(doubleList->set("double array param", doubleArray, "double array parameter", doubleArrayVali));
604  Array<double> doubleBadArray = tuple<double>(11.0,4.0,2.0,5.0);
605  TEST_THROW(doubleList->set("double bad array param", doubleBadArray, "double bad array parameter", doubleArrayVali),
606  Exceptions::InvalidParameterValue);
607  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", doubleArrayVali),
608  Exceptions::InvalidParameterType);
609 
610  /*
611  * Testing FileName ArrayValidator.
612  */
613  RCP<ParameterList> fileNameList = rcp(new ParameterList("Filename List"));
614  RCP<FileNameValidator> fileNameVali = rcp(new FileNameValidator(true));
615  RCP<ArrayFileNameValidator> arrayFileNameVali = rcp(new ArrayFileNameValidator(fileNameVali));
616  TEST_ASSERT(arrayFileNameVali->getPrototype().get() == fileNameVali.get());
617  Array<std::string> fileNameArray = tuple<std::string>("testFile.txt", "testFile2.txt", "testFile3.txt");
618  Array<std::string> fileNameBadArray = tuple<std::string>("doesnexist.txt", "testFile2.txt", "testFile3.txt");
619  TEST_NOTHROW(fileNameList->set("File name array", fileNameArray, "file name array parameter", arrayFileNameVali));
620  TEST_THROW(fileNameList->set("Bad File name array", fileNameBadArray, "bad file name array parameter", arrayFileNameVali),
621  Exceptions::InvalidParameterValue);
622  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", arrayFileNameVali),
623  Exceptions::InvalidParameterType);
624 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
std::complex< double > std::complex< double > long
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [185/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
usedParameters   
)

Definition at line 524 of file ObjectBuilder_UnitTests.cpp.

524  {
525  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>("Foo","Foo Type");
526  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
527  ob->setObjectFactory(abstractFactoryStd<Foo,FooB>(),"Foo B");
528  ob->setObjectFactory(abstractFactoryStd<Foo,FooC>(),"Foo C");
529  {
530  const RCP<ParameterList> pl = parameterList();
531  ob->setParameterList(pl);
532  const RCP<Foo> foo = ob->create("Foo A");
533  TEST_EQUALITY_CONST( foo->getString(), "A" );
534  TEST_EQUALITY_CONST( pl->isSublist("Foo A"), true ); // 1.
535  TEST_EQUALITY_CONST( pl->sublist("Foo A").isParameter("String"), true ); // 1.
536  const ParameterEntry& pe = pl->sublist("Foo A").getEntry("String");
537  TEST_EQUALITY_CONST( pe.isUsed(), true ); // 1.
538  TEST_EQUALITY_CONST( pe.isDefault(), true ); // 1.
539  // verify the other sublists are missing
540  TEST_EQUALITY_CONST( pl->isSublist("Foo B"), false ); // 1.
541  TEST_EQUALITY_CONST( pl->isSublist("Foo C"), false ); // 1.
542  ob->unsetParameterList();
543  }
544  {
545  RCP<ParameterList> pl = parameterList();
546  pl->setParameters(*ob->getValidParameters());
547  pl->sublist("Foo A").set("String","AA");
548  ob->setParameterList(pl);
549  pl = null;
550  const RCP<Foo> foo = ob->create("Foo A");
551  TEST_EQUALITY_CONST( foo->getString(), "AA" );
552  const RCP<const ParameterList> outPL = ob->getParameterList();
553  TEST_EQUALITY_CONST( outPL->isSublist("Foo A"), true );
554  TEST_EQUALITY_CONST( outPL->sublist("Foo A").isParameter("String"), true );
555  const ParameterEntry& pe = outPL->sublist("Foo A").getEntry("String");
556  TEST_EQUALITY_CONST( pe.isUsed(), true ); // 2.
557  TEST_EQUALITY_CONST( pe.isDefault(), false ); // 2.
558  // verify the other sublists are unused
559  TEST_EQUALITY_CONST( outPL->sublist("Foo B").getEntry("String").isUsed(), false ); // 2.
560  TEST_EQUALITY_CONST( outPL->sublist("Foo C").getEntry("String").isUsed(), false ); // 2.
561  ob->unsetParameterList();
562  }
563 }
RCP< ParameterList > parameterList()
Nonmember constructor.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Definition: gkregex.c:113
Definition: gkregex.c:113

◆ TEUCHOS_UNIT_TEST() [186/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
sublist_add_2   
)

Definition at line 527 of file ParameterList_UnitTests.cpp.

528 {
529  ParameterList PL_Main("PL_Main");
530  const std::string Direction_Doc = "This sublist controls how direction is computed.";
531  ParameterList& PL_Direction = PL_Main.sublist("Direction", false, Direction_Doc);
532  ParameterList& PL_LineSearch = PL_Main.sublist("Line Search");
533  out << "PL_Main=\n" << PL_Main << "\n";
534  TEST_EQUALITY_CONST(PL_Main.name(), "PL_Main");
535  TEST_EQUALITY_CONST(PL_Main.isSublist("Direction"), true);
536  TEST_EQUALITY_CONST(PL_Main.isSublist("Line Search"), true);
537  ECHO(const ParameterList& PL_Direction_2 = getConst(PL_Main).sublist("Direction"));
538  TEST_EQUALITY(&PL_Direction, &PL_Direction_2);
539  ECHO(const ParameterList& PL_LineSearch_2 = getConst(PL_Main).sublist("Line Search"));
540  TEST_EQUALITY(&PL_LineSearch, &PL_LineSearch_2);
541  TEST_EQUALITY_CONST(getConst(PL_Main).sublist("Direction").name(), "PL_Main->Direction");
542  TEST_EQUALITY_CONST(PL_Direction.name(), "PL_Main->Direction");
543  TEST_EQUALITY_CONST(PL_LineSearch.name(), "PL_Main->Line Search");
544 }
RCP< ParameterList > sublist(const RCP< ParameterList > &paramList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
Return a RCP to a sublist in another RCP-ed parameter list.
char * name
Definition: lp_lib.h:823
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [187/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validator  ,
existingPrototypeTest   
)

Definition at line 543 of file Validator_SerializationTest.cpp.

543  {
544  ParameterList pl("ExsitingPrototypeList");
545  RCP<StringValidator> stringVali = rcp(new StringValidator());
546  RCP<ArrayValidator<StringValidator, std::string> > arrayStringVali
547  = rcp(new ArrayValidator<StringValidator, std::string>(stringVali));
548  Array<std::string> strArray = tuple<std::string>("blah", "blah", "blah");
549  pl.set("string param", "hi", "a string param", stringVali);
550  pl.set("string array param", strArray,
551  "a string array parameter", arrayStringVali);
552  RCP<ParameterList> readInPL = writeThenReadPL(pl);
553  RCP<const ArrayValidator<StringValidator, std::string> >
554  inArrayValidator =
555  rcp_dynamic_cast<const ArrayValidator<StringValidator, std::string> >(
556  readInPL->getEntry("string array param").validator(), true);
557  TEST_ASSERT(readInPL->getEntry("string param").validator()
558  == inArrayValidator->getPrototype());
559 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [188/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
sublist_scenario_1   
)

Definition at line 547 of file ParameterList_UnitTests.cpp.

548 {
549  // This is the scenario in the orginal testing program
550  ParameterList PL_Main("PL_Main");
551  const std::string Direction_Doc = "This sublist controls how direction is computed.";
552  ParameterList &PL_Direction = PL_Main.sublist("Direction", false, Direction_Doc);
553  ParameterList &PL_Newton = PL_Direction.sublist("Newton");
554  ParameterList &PL_LinSol = PL_Newton.sublist("Linear Solver");
555  ParameterList &PL_LineSearch = PL_Main.sublist("Line Search");
556  out << "PL_Main=\n" << PL_Main << "\n";
557  TEST_EQUALITY_CONST(PL_Main.name(), "PL_Main");
558  TEST_EQUALITY_CONST(PL_Main.isSublist("Direction"), true);
559  ECHO(const ParameterList& PL_Direction_2 = getConst(PL_Main).sublist("Direction"));
560  TEST_EQUALITY(&PL_Direction, &PL_Direction_2);
561  TEST_EQUALITY_CONST(getConst(PL_Main).sublist("Direction").name(), "PL_Main->Direction");
562  TEST_EQUALITY_CONST(PL_Direction.name(), "PL_Main->Direction");
563  TEST_EQUALITY_CONST(PL_Direction.isSublist("Newton"), true);
564  TEST_EQUALITY_CONST(PL_Newton.isSublist("Linear Solver"), true);
565  TEST_EQUALITY_CONST(PL_Newton.name(), "PL_Main->Direction->Newton");
566  TEST_EQUALITY_CONST(PL_Newton.isSublist("Linear Solver"), true);
567  TEST_EQUALITY_CONST(PL_LinSol.name(), "PL_Main->Direction->Newton->Linear Solver");
568  TEST_EQUALITY_CONST(PL_Main.isSublist("Line Search"), true);
569  TEST_EQUALITY_CONST(PL_LineSearch.name(), "PL_Main->Line Search");
570 }
RCP< ParameterList > sublist(const RCP< ParameterList > &paramList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
Return a RCP to a sublist in another RCP-ed parameter list.
char * name
Definition: lp_lib.h:823
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [189/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
setDefaultObject_withOneUsePL   
)

Definition at line 565 of file ObjectBuilder_UnitTests.cpp.

565  {
566  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>("Foo","Foo Type");
567  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
568  ob->setObjectFactory(abstractFactoryStd<Foo,FooB>(),"Foo B");
569  ob->setObjectFactory(abstractFactoryStd<Foo,FooC>(),"Foo C");
570  {
571  const RCP<ParameterList> pl = parameterList();
572  ob->setParameterList(pl);
573  const RCP<Foo> foo = ob->create();
574  RCP<FooC> fooC = Teuchos::rcp_dynamic_cast<FooC>(foo,false);
575  TEST_ASSERT( !is_null(fooC) );
576  }
577  {
578  const RCP<ParameterList> pl = parameterList();
579  ob->setParameterList(pl);
580  ob->setDefaultObject("Foo A");
581  const RCP<Foo> foo = ob->create();
582  RCP<FooA> fooA = Teuchos::rcp_dynamic_cast<FooA>(foo,false);
583  TEST_ASSERT( !is_null(fooA) );
584  }
585  {
586  const RCP<ParameterList> pl = parameterList();
587  ob->setParameterList(pl);
588  ob->setDefaultObject("None");
589  const RCP<Foo> foo = ob->create();
590  TEST_ASSERT( is_null(foo) );
591  }
592  {
593 #ifdef TEUCHOS_DEBUG
594  TEST_THROW(ob->setDefaultObject("Foo D"), std::logic_error);
595 #else
596  ob->setDefaultObject("Foo D");
597  TEST_THROW(ob->getValidParameters(), std::logic_error);
598 #endif // TEUCHOS_DEBUG
599  }
600 }
TEST_ASSERT(nonnull(readInCon))
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
RCP< ParameterList > parameterList()
Nonmember constructor.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [190/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
copy_constructor   
)

Definition at line 573 of file ParameterList_UnitTests.cpp.

574 {
575  ECHO(ParameterList pl1("A"));
576  ECHO(pl1.set("my int", 2));
577  ECHO(ParameterList pl2(pl1));
578  TEST_EQUALITY_CONST(pl2.name(), "A");
579  TEST_EQUALITY_CONST(pl2.get<int>("my int"), 2);
580 }

◆ TEUCHOS_UNIT_TEST() [191/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
assignment_operator   
)

Definition at line 583 of file ParameterList_UnitTests.cpp.

584 {
585  ECHO(ParameterList pl1("A"));
586  ECHO(pl1.set("my int", 2));
587  ECHO(ParameterList pl2);
588  ECHO(const ParameterList &pl2_ref = pl2 = pl1);
589  TEST_EQUALITY_CONST(&pl2_ref, &pl2);
590  TEST_EQUALITY_CONST(pl2.name(), "A");
591  TEST_EQUALITY_CONST(pl2.get<int>("my int"), 2);
592 }
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [192/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
iterator_params   
)

Definition at line 595 of file ParameterList_UnitTests.cpp.

596 {
597  typedef ParameterList::ConstIterator ConstIter;
598  ParameterList pl;
599  pl.set("c", 1);
600  pl.set("a", 2);
601  pl.set("b", 3);
602  ConstIter pl_itr = pl.begin();
603  TEST_EQUALITY_CONST(pl_itr->first, "c");
604  TEST_EQUALITY_CONST(pl_itr->second.getValue<int>(0), 1);
605  ECHO(++pl_itr);
606  TEST_EQUALITY_CONST(pl_itr->first, "a");
607  TEST_EQUALITY_CONST(pl_itr->second.getValue<int>(0), 2);
608  ECHO(++pl_itr);
609  TEST_EQUALITY_CONST(pl_itr->first, "b");
610  TEST_EQUALITY_CONST(pl_itr->second.getValue<int>(0), 3);
611  ECHO(++pl_itr);
612  TEST_ITER_EQUALITY(pl_itr, pl.end());
613 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [193/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
setDefaultObject_withMultipleUsePL   
)

Definition at line 601 of file ObjectBuilder_UnitTests.cpp.

601  {
602  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>("Foo","Foo Type");
603  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
604  ob->setObjectFactory(abstractFactoryStd<Foo,FooB>(),"Foo B");
605  ob->setObjectFactory(abstractFactoryStd<Foo,FooC>(),"Foo C");
606  const RCP<ParameterList> pl = parameterList();
607  ob->setParameterList(pl);
608  {
609  const RCP<Foo> foo = ob->create();
610  RCP<FooC> fooC = Teuchos::rcp_dynamic_cast<FooC>(foo,false);
611  TEST_ASSERT( !is_null(fooC) );
612  // Note: At this point, pl contains "Foo Type = Foo C"
613  // And this pl was set on the ObjectBuilder, so defaultObject does no good.
614  }
615  {
616  ob->setDefaultObject("Foo A");
617  const RCP<Foo> foo = ob->create();
618  RCP<FooA> fooA = Teuchos::rcp_dynamic_cast<FooA>(foo,false);
619  TEST_ASSERT( is_null(fooA) );
620  }
621  {
622  ob->setDefaultObject("None");
623  const RCP<Foo> foo = ob->create();
624  TEST_ASSERT( !is_null(foo) );
625  }
626 }
TEST_ASSERT(nonnull(readInCon))
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
RCP< ParameterList > parameterList()
Nonmember constructor.
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [194/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
testTwoDRowDependency   
)

Test the TwoDRowDependency.

Definition at line 608 of file Dependencies_UnitTests.cpp.

608  {
609  RCP<ParameterList> My_deplist = RCP<ParameterList>(new ParameterList);
610  RCP<DependencySheet> depSheet1 =
611  RCP<DependencySheet>(new DependencySheet);
612 
613  ParameterList
614  rowNumDepList = My_deplist->sublist(
615  "2D Row Depdency List", false,
616  "2D Row Dependecy testing list.");
617  rowNumDepList.set("Num rows", 10, "num rows setter");
618  TwoDArray<double> variableRowsArray(11,2,16.5);
619  RCP<EnhancedNumberValidator<double> >
620  varRowArrayVali = RCP<EnhancedNumberValidator<double> >(
621  new EnhancedNumberValidator<double>(10,50,4)
622  );
623  rowNumDepList.set(
624  "Variable Row Array", variableRowsArray, "variable row array",
625  RCP<TwoDArrayNumberValidator<double> >(
626  new TwoDArrayNumberValidator<double>(varRowArrayVali)));
627 
628  RCP<TwoDRowDependency<int, double> >
629  arrayRowDep = rcp(
630  new TwoDRowDependency<int, double>(
631  rowNumDepList.getEntryRCP("Num rows"),
632  rowNumDepList.getEntryRCP("Variable Row Array") ,
633  rcp(new AdditionFunction<int>(1))
634  )
635  );
636  depSheet1->addDependency(arrayRowDep);
637  TwoDArray<double> curArray =
638  rowNumDepList.get<TwoDArray<double> >("Variable Row Array");
639  TEST_EQUALITY_CONST(curArray.getNumRows(),11);
640  rowNumDepList.set("Num rows", 12);
641  arrayRowDep()->evaluate();
642  curArray =
643  rowNumDepList.get<TwoDArray<double> >("Variable Row Array");
644  TEST_EQUALITY_CONST(curArray.getNumRows(),13);
645  rowNumDepList.set("Num rows", -2);
646  TEST_THROW(arrayRowDep()->evaluate(),
647  Exceptions::InvalidParameterValue);
648 }
RCP< DependencySheet > depSheet1
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [195/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
iterator_params_sublists   
)

Definition at line 616 of file ParameterList_UnitTests.cpp.

617 {
618  typedef ParameterList::ConstIterator ConstIter;
619  ParameterList pl("base");
620  pl.set("c", 1);
621  pl.sublist("a");
622  pl.set("b", 3);
623  ConstIter pl_itr = pl.begin();
624  TEST_EQUALITY_CONST(pl_itr->first, "c");
625  TEST_EQUALITY_CONST(pl_itr->second.getValue<int>(0), 1);
626  ECHO(++pl_itr);
627  TEST_EQUALITY_CONST(pl_itr->first, "a");
628  TEST_EQUALITY_CONST(pl_itr->second.getValue<ParameterList>(0).name(), "base->a");
629  ECHO(++pl_itr);
630  TEST_EQUALITY_CONST(pl_itr->first, "b");
631  TEST_EQUALITY_CONST(pl_itr->second.getValue<int>(0), 3);
632  ECHO(++pl_itr);
633  TEST_ITER_EQUALITY(pl_itr, pl.end());
634 }
CORBA::PolicyList pl
Definition: corbaimpl.cpp:59
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [196/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_ObjectBuilder  ,
setDefaultObject_withoutPL   
)

Definition at line 628 of file ObjectBuilder_UnitTests.cpp.

628  {
629  const RCP<ObjectBuilder<Foo> > ob = objectBuilder<Foo>("Foo","Foo Type");
630  ob->setObjectFactory(abstractFactoryStd<Foo,FooA>(),"Foo A");
631  ob->setObjectFactory(abstractFactoryStd<Foo,FooB>(),"Foo B");
632  ob->setObjectFactory(abstractFactoryStd<Foo,FooC>(),"Foo C");
633  {
634  const RCP<Foo> foo = ob->create();
635  RCP<FooC> fooC = Teuchos::rcp_dynamic_cast<FooC>(foo,false);
636  TEST_ASSERT( !is_null(fooC) );
637  }
638  {
639  ob->setDefaultObject("Foo A");
640  const RCP<Foo> foo = ob->create();
641  RCP<FooA> fooA = Teuchos::rcp_dynamic_cast<FooA>(foo,false);
642  TEST_ASSERT( !is_null(fooA) );
643  }
644  {
645  ob->setDefaultObject("None");
646  const RCP<Foo> foo = ob->create();
647  TEST_ASSERT( is_null(foo) );
648  }
649 }
TEST_ASSERT(nonnull(readInCon))
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [197/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Validators  ,
twoDArrayValidators   
)

Definition at line 629 of file Validator_UnitTest.cpp.

630 {
631 
632  /*
633  * Testing StringArrayValidator.
634  */
635  RCP<ParameterList> stringList = rcp(new ParameterList("String List"));
636  Array<std::string> stringVals = tuple<std::string>("str1", "str2", "str3");
637  RCP<StringValidator> stringVali = rcp(new StringValidator(stringVals));
638  RCP<TwoDArrayStringValidator> stringArrayVali =
639  rcp(new TwoDArrayStringValidator(stringVali));
640  TEST_ASSERT(stringVali.get() == stringArrayVali->getPrototype().get());
641  TwoDArray<std::string> stringArray(2,2);
642  stringArray(0,0) = "str2";
643  stringArray(0,1) = "str1";
644  stringArray(1,0) = "str3";
645  stringArray(1,1) = "str2";
646  TEST_NOTHROW(stringList->set("String Array Param", stringArray, "string array parameter", stringArrayVali));
647  TwoDArray<std::string> badStringArray(2,2);
648  badStringArray(0,0) = "str2";
649  badStringArray(0,1) = "str1";
650  badStringArray(1,0) = "str3";
651  badStringArray(1,1) = "not valid";
652  TEST_THROW(stringList->set("String Array Param", badStringArray, "string array parameter", stringArrayVali),
653  Exceptions::InvalidParameterValue);
654  TEST_THROW(stringList->set("Int param", 5, "int parameter", stringArrayVali),
655  Exceptions::InvalidParameterType);
656  TwoDArray<long> longArray(2,2);
657  longArray(0,0) = (long)5;
658  longArray(0,1) = (long)4;
659  longArray(1,0) = (long)9;
660  longArray(1,1) = (long)1;
661  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", stringArrayVali),
662  Exceptions::InvalidParameterType);
663 
664  /*
665  * Testing Int ArrayValidator.
666  */
667  RCP<ParameterList> intList = rcp(new ParameterList("Int List"));
668  RCP<EnhancedNumberValidator<int> > intVali = rcp(new EnhancedNumberValidator<int>(0, 10));
669  RCP<TwoDArrayNumberValidator<int> > intArrayVali =
670  rcp(new TwoDArrayNumberValidator<int>(intVali));
671  TEST_ASSERT(intVali.get() == intArrayVali->getPrototype().get());
672  TwoDArray<int> intArray(2,2);
673  intArray(0,0) = 1;
674  intArray(0,1) = 4;
675  intArray(1,0) = 2;
676  intArray(1,1) = 5;
677  TEST_NOTHROW(intList->set("int array param", intArray, "int array parameter", intArrayVali));
678  TwoDArray<int> intBadArray(2,2);
679  intBadArray(0,0) = 11;
680  intBadArray(0,1) = 4;
681  intBadArray(1,0) = 2;
682  intBadArray(1,1) = 5;
683  TEST_THROW(intList->set("int bad array param", intBadArray, "int bad array parameter", intArrayVali),
684  Exceptions::InvalidParameterValue);
685  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", intArrayVali),
686  Exceptions::InvalidParameterType);
687 
688  /*
689  * Testing Short ArrayValidator.
690  */
691  RCP<ParameterList> shortList = rcp(new ParameterList("Short List"));
692  RCP<EnhancedNumberValidator<short> > shortVali =
693  rcp(new EnhancedNumberValidator<short>(0, 10));
694  RCP<TwoDArrayNumberValidator<short> > shortArrayVali =
695  rcp(new TwoDArrayNumberValidator<short>(shortVali));
696  TEST_ASSERT(shortVali.get() == shortArrayVali->getPrototype().get());
697  TwoDArray<short> shortArray(2,2);
698  shortArray(0,0) = 1;
699  shortArray(0,1) = 4;
700  shortArray(1,0) = 2;
701  shortArray(1,1) = 5;
702  TEST_NOTHROW(shortList->set("short array param", shortArray, "short array parameter", shortArrayVali));
703  TwoDArray<short> shortBadArray(2,2);
704  shortBadArray(0,0) = 11;
705  shortBadArray(0,1) = 4;
706  shortBadArray(1,0) = 2;
707  shortBadArray(1,1) = 5;
708  TEST_THROW(shortList->set("short bad array param", shortBadArray, "short bad array parameter", shortArrayVali),
709  Exceptions::InvalidParameterValue);
710  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", shortArrayVali),
711  Exceptions::InvalidParameterType);
712 
713  /*
714  * Testing Float ArrayValidator.
715  */
716  RCP<ParameterList> floatList = rcp(new ParameterList("Float List"));
717  RCP<EnhancedNumberValidator<float> > floatVali =
718  rcp(new EnhancedNumberValidator<float>(0.0, 10.0));
719  RCP<TwoDArrayNumberValidator<float> > floatArrayVali =
720  rcp(new TwoDArrayNumberValidator<float>(floatVali));
721  TEST_ASSERT(floatVali.get() == floatArrayVali->getPrototype().get());
722  TwoDArray<float> floatArray(2,2);
723  floatArray(0,0) = 1.0;
724  floatArray(0,1) = 4.0;
725  floatArray(1,0) = 5.0;
726  floatArray(1,1) = 2.0;
727  TEST_NOTHROW(floatList->set("float array param", floatArray, "float array parameter", floatArrayVali));
728  TwoDArray<float> floatBadArray(2,2);
729  floatBadArray(0,0) = 11.0;
730  floatBadArray(0,1) = 4.0;
731  floatBadArray(1,0) = 5.0;
732  floatBadArray(1,1) = 2.0;
733  TEST_THROW(floatList->set("float bad array param", floatBadArray, "float bad array parameter", floatArrayVali),
734  Exceptions::InvalidParameterValue);
735  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", floatArrayVali),
736  Exceptions::InvalidParameterType);
737 
738  /*
739  * Testing Double ArrayValidator.
740  */
741  RCP<ParameterList> doubleList = rcp(new ParameterList("Double List"));
742  RCP<EnhancedNumberValidator<double> > doubleVali =
743  rcp(new EnhancedNumberValidator<double>(0.0, 10.0));
744  RCP<TwoDArrayNumberValidator<double> > doubleArrayVali =
745  rcp(new TwoDArrayNumberValidator<double>(doubleVali));
746  TEST_ASSERT(doubleVali.get() == doubleArrayVali->getPrototype().get());
747  TwoDArray<double> doubleArray(2,2);
748  doubleArray(0,0) = 1.0;
749  doubleArray(0,1) = 4.0;
750  doubleArray(1,0) = 5.0;
751  doubleArray(1,1) = 2.0;
752  TEST_NOTHROW(doubleList->set("double array param", doubleArray, "double array parameter", doubleArrayVali));
753  TwoDArray<double> doubleBadArray(2,2);
754  doubleBadArray(0,0) = 11.0;
755  doubleBadArray(0,1) = 4.0;
756  doubleBadArray(1,0) = 5.0;
757  doubleBadArray(1,1) = 2.0;
758  TEST_THROW(doubleList->set("double bad array param", doubleBadArray, "double bad array parameter", doubleArrayVali),
759  Exceptions::InvalidParameterValue);
760  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", doubleArrayVali),
761  Exceptions::InvalidParameterType);
762 
763  /*
764  * Testing FileName ArrayValidator.
765  */
766  RCP<ParameterList> fileNameList = rcp(new ParameterList("Filename List"));
767  RCP<FileNameValidator> fileNameVali = rcp(new FileNameValidator(true));
768  RCP<TwoDArrayFileNameValidator> arrayFileNameVali =
769  rcp(new TwoDArrayFileNameValidator(fileNameVali));
770  TEST_ASSERT(arrayFileNameVali->getPrototype().get() == fileNameVali.get());
771  TwoDArray<std::string> fileNameArray(2,2);
772  fileNameArray(0,0) = "testFile.txt";
773  fileNameArray(0,1) = "testFile2.txt";
774  fileNameArray(1,0) = "testFile3.txt";
775  fileNameArray(1,1) = "testFile.txt";
776  TwoDArray<std::string> fileNameBadArray(2,2);
777  fileNameBadArray(0,0) = "doesntexist.txt";
778  fileNameBadArray(0,1) = "testFile2.txt";
779  fileNameBadArray(1,0) = "testFile3.txt";
780  fileNameBadArray(1,1) = "testFile.txt";
781  TEST_NOTHROW(fileNameList->set("File name array", fileNameArray, "file name array parameter", arrayFileNameVali));
782  TEST_THROW(fileNameList->set("Bad File name array", fileNameBadArray, "bad file name array parameter", arrayFileNameVali),
783  Exceptions::InvalidParameterValue);
784  TEST_THROW(stringList->set("Long array param", longArray, "long array parameter", arrayFileNameVali),
785  Exceptions::InvalidParameterType);
786 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
std::complex< double > std::complex< double > long
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [198/224]

Teuchos::TEUCHOS_UNIT_TEST ( TimeMonitor  ,
FUNC_TIME_MONITOR_tested   
)

Definition at line 639 of file TimeMonitor_UnitTests.cpp.

640  {
642  using Teuchos::parameterList;
643  using Teuchos::RCP;
644 
645  func_time_monitor2 ();
646 
647  {
648  std::ostringstream oss;
649  TimeMonitor::summarize (oss);
650 
651  // Echo summarize() output to the FancyOStream out (which is a
652  // standard unit test argument). Output should only appear in
653  // show-all-test-details mode.
654  out << oss.str() << std::endl;
655 
656  const size_t substr_i = oss.str().find ("FUNC_TIME_MONITOR2");
657  TEST_INEQUALITY(substr_i, std::string::npos);
658  const size_t substr_inner_i = oss.str().find ("FUNC_TIME_MONITOR2_inner");
659  TEST_INEQUALITY(substr_inner_i, std::string::npos);
660  }
661 
662  { // Repeat test for YAML output, compact style.
663  std::ostringstream oss;
664  RCP<ParameterList> reportParams =
665  parameterList (* (TimeMonitor::getValidReportParameters ()));
666  reportParams->set ("Report format", "YAML");
667  reportParams->set ("YAML style", "compact");
668  TimeMonitor::report (oss, reportParams);
669 
670  // Echo output to the FancyOStream out (which is a standard unit
671  // test argument). Output should only appear in "show all test
672  // details" mode.
673  out << oss.str () << std::endl;
674 
675  const size_t substr_i = oss.str().find ("FUNC_TIME_MONITOR2");
676  TEST_INEQUALITY(substr_i, std::string::npos);
677  const size_t substr_inner_i = oss.str().find ("FUNC_TIME_MONITOR2_inner");
678  TEST_INEQUALITY(substr_inner_i, std::string::npos);
679  }
680 
681  { // Repeat test for YAML output, spacious style.
682  std::ostringstream oss;
683  RCP<ParameterList> reportParams =
684  parameterList (* (TimeMonitor::getValidReportParameters ()));
685  reportParams->set ("Report format", "YAML");
686  reportParams->set ("YAML style", "spacious");
687  TimeMonitor::report (oss, reportParams);
688 
689  // Echo output to the FancyOStream out (which is a standard unit
690  // test argument). Output should only appear in "show all test
691  // details" mode.
692  out << oss.str () << std::endl;
693 
694  const size_t substr_i = oss.str().find ("FUNC_TIME_MONITOR2");
695  TEST_INEQUALITY(substr_i, std::string::npos);
696  const size_t substr_inner_i = oss.str().find ("FUNC_TIME_MONITOR2_inner");
697  TEST_INEQUALITY(substr_inner_i, std::string::npos);
698  }
699 
700  // This sets up for the next unit test.
701  TimeMonitor::clearCounters ();
702  }
void __VACALL report(lprec *lp, int level, char *format,...)
Definition: lp_report.c:55
A list of parameters of arbitrary type.
Smart reference counting pointer class for automatic garbage collection.
RCP< ParameterList > parameterList()
Nonmember constructor.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [199/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
operatorEqualityWithEmpty   
)

Definition at line 641 of file ParameterList_UnitTests.cpp.

642 {
643  // An empty list should not be equal to a full list
644  ParameterList A;
645  ParameterList B;
646  TEST_ASSERT( A == B );
647  A.set("Hello","World");
648  TEST_ASSERT( A != B );
649  B.set("Hello","World");
650  TEST_ASSERT( A == B );
651 }
TEST_ASSERT(nonnull(readInCon))
char * A[COUNT]
Definition: smash_test.c:14
void const ipfint const ipfint const ipfint const ipfint const ipfint const double const ipfint const ipfint const ipfint const ipfint ipfint const ipfint double * B
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [200/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
testTwoDColDependency   
)

Test the TwoDColDependency.

Definition at line 653 of file Dependencies_UnitTests.cpp.

653  {
654  RCP<ParameterList> My_deplist = RCP<ParameterList>(new ParameterList);
655  RCP<DependencySheet> depSheet1 =
656  RCP<DependencySheet>(new DependencySheet);
657 
658  ParameterList
659  colNumDepList = My_deplist->sublist(
660  "2D Col Depdency List", false,
661  "2D Col Dependecy testing list.");
662  colNumDepList.set("Num cols", 2, "num cols setter");
663  TwoDArray<double> variableColsArray(11,3,16.5);
664  RCP<EnhancedNumberValidator<double> >
665  varColArrayVali = RCP<EnhancedNumberValidator<double> >(
666  new EnhancedNumberValidator<double>(10,50,4)
667  );
668  colNumDepList.set(
669  "Variable Col Array", variableColsArray, "variable col array",
670  RCP<TwoDArrayNumberValidator<double> >(
671  new TwoDArrayNumberValidator<double>(varColArrayVali)));
672 
673  RCP<TwoDColDependency<int, double> >
674  arrayColDep = rcp(
675  new TwoDColDependency<int, double>(
676  colNumDepList.getEntryRCP("Num cols"),
677  colNumDepList.getEntryRCP("Variable Col Array") ,
678  rcp(new AdditionFunction<int>(1))
679  )
680  );
681  depSheet1->addDependency(arrayColDep);
682  TwoDArray<double> curArray =
683  colNumDepList.get<TwoDArray<double> >("Variable Col Array");
684  TEST_EQUALITY_CONST(curArray.getNumCols(),3);
685  colNumDepList.set("Num cols", 4);
686  arrayColDep()->evaluate();
687  curArray =
688  colNumDepList.get<TwoDArray<double> >("Variable Col Array");
689  TEST_EQUALITY_CONST(curArray.getNumCols(),5);
690  colNumDepList.set("Num cols", -2);
691  TEST_THROW(arrayColDep()->evaluate(),
692  Exceptions::InvalidParameterValue);
693 }
RCP< DependencySheet > depSheet1
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [201/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
operatorEqualityDifferentSublistNames   
)

Definition at line 654 of file ParameterList_UnitTests.cpp.

655 {
656  // Sublists with different names should not be equal
657  ParameterList A;
658  ParameterList B;
659  A.sublist("Bob");
660  B.sublist("Tom");
661  TEST_ASSERT( A != B );
662 }
TEST_ASSERT(nonnull(readInCon))
char * A[COUNT]
Definition: smash_test.c:14
void const ipfint const ipfint const ipfint const ipfint const ipfint const double const ipfint const ipfint const ipfint const ipfint ipfint const ipfint double * B
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [202/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
operatorEqualityDifferentLengths   
)

Definition at line 665 of file ParameterList_UnitTests.cpp.

666 {
667  ParameterList A;
668  ParameterList B;
669  A.set("A","a");
670  A.set("B","b");
671  A.set("C","c");
672  A.print(out);
673 
674  B.set("A","a");
675  B.set("B","b");
676  B.print(out);
677 
678  TEST_ASSERT( A != B );
679 
680  B.set("C","c");
681  TEST_ASSERT( A == B );
682 }
TEST_ASSERT(nonnull(readInCon))
char * A[COUNT]
Definition: smash_test.c:14
void const ipfint const ipfint const ipfint const ipfint const ipfint const double const ipfint const ipfint const ipfint const ipfint ipfint const ipfint double * B
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [203/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
haveSameValuesWithEmpty   
)

Definition at line 685 of file ParameterList_UnitTests.cpp.

686 {
687  ParameterList A;
688  ParameterList B;
689  TEST_ASSERT( haveSameValues(A,B) );
690  A.set("Hello","World");
691  TEST_ASSERT( !haveSameValues(A,B) );
692  B.set("Hello","World");
693  TEST_ASSERT( haveSameValues(A,B) );
694 }
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT bool haveSameValues(const ParameterList &list1, const ParameterList &list2)
Returns true if two parameter lists have the same values.
TEST_ASSERT(nonnull(readInCon))
char * A[COUNT]
Definition: smash_test.c:14
void const ipfint const ipfint const ipfint const ipfint const ipfint const double const ipfint const ipfint const ipfint const ipfint ipfint const ipfint double * B
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [204/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
haveSameValuesDifferentSublistNames   
)

Definition at line 697 of file ParameterList_UnitTests.cpp.

698 {
699  ParameterList A;
700  ParameterList B;
701  A.sublist("Smith").set("People",4);
702  B.sublist("Jones").set("People",4);
703  TEST_ASSERT( !haveSameValues(A,B) ); // sublist names matter
704 }
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT bool haveSameValues(const ParameterList &list1, const ParameterList &list2)
Returns true if two parameter lists have the same values.
TEST_ASSERT(nonnull(readInCon))
char * A[COUNT]
Definition: smash_test.c:14
void const ipfint const ipfint const ipfint const ipfint const ipfint const double const ipfint const ipfint const ipfint const ipfint ipfint const ipfint double * B
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [205/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
testArrayLengthDep   
)

Test the ArrayLengthDependency.

Definition at line 699 of file Dependencies_UnitTests.cpp.

699  {
700  RCP<ParameterList> My_deplist = RCP<ParameterList>(new ParameterList);
701  RCP<DependencySheet> depSheet1 =
702  RCP<DependencySheet>(new DependencySheet);
703 
704  ParameterList
705  numberArrayLengthDepList = My_deplist->sublist(
706  "Number Array Length Dependency List", false,
707  "Number Array Length Dependecy testing list.");
708  numberArrayLengthDepList.set("Array Length", 10, "array length setter");
709  Array<double> variableLengthArray(11,23.0);
710  RCP<EnhancedNumberValidator<double> >
711  varLengthArrayVali = RCP<EnhancedNumberValidator<double> >(
712  new EnhancedNumberValidator<double>(10,50,4)
713  );
714  numberArrayLengthDepList.set(
715  "Variable Length Array", variableLengthArray, "variable length array",
716  RCP<ArrayNumberValidator<double> >(
717  new ArrayNumberValidator<double>(varLengthArrayVali)));
718 
719  RCP<NumberArrayLengthDependency<int, double> >
720  arrayLengthDep(
721  new NumberArrayLengthDependency<int, double>(
722  numberArrayLengthDepList.getEntryRCP("Array Length"),
723  numberArrayLengthDepList.getEntryRCP("Variable Length Array"),
724  rcp(new AdditionFunction<int>(1))
725  )
726  );
727  depSheet1->addDependency(arrayLengthDep);
728  Array<double> curArray =
729  numberArrayLengthDepList.get<Array<double> >("Variable Length Array");
730  TEST_ASSERT(curArray.length() ==11);
731  numberArrayLengthDepList.set("Array Length", 12);
732  arrayLengthDep()->evaluate();
733  curArray =
734  numberArrayLengthDepList.get<Array<double> >("Variable Length Array");
735  out << curArray.length() << std::endl;
736  TEST_ASSERT(curArray.length() ==13);
737  numberArrayLengthDepList.set("Array Length", -2);
738  TEST_THROW(arrayLengthDep()->evaluate(),
739  Exceptions::InvalidParameterValue);
740 }
RCP< DependencySheet > depSheet1
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [206/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
validateAgainstSelf   
)

Definition at line 707 of file ParameterList_UnitTests.cpp.

708 {
709  ParameterList PL_Main = createMainPL();
710  ParameterList PL_Main_valid = createValidMainPL();
711  TEST_NOTHROW(PL_Main.validateParameters(PL_Main_valid));
712 }
ParameterList createMainPL()
ParameterList createValidMainPL()
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [207/224]

Teuchos::TEUCHOS_UNIT_TEST ( TimeMonitor  ,
SUMMARIZE_diffTimerSets   
)

Definition at line 711 of file TimeMonitor_UnitTests.cpp.

712  {
713  RCP<const Comm<int> > comm = Teuchos::DefaultComm<int>::getComm ();
714  const int numProcs = comm->getSize ();
715  const int myRank = comm->getRank ();
716 
717  // If MPI has not been initialized, turn the MPI communicator into
718  // a "serial" communicator. This may not be necessary when using
719  // the Teuchos Unit Test Framework.
720 #ifdef HAVE_MPI
721  {
722  int mpiHasBeenInitialized = 0;
723  MPI_Initialized (&mpiHasBeenInitialized);
724  if (! mpiHasBeenInitialized) {
726  }
727  }
728 #endif // HAVE_MPI
729 
730  // Store the output of TimeMonitor::summarize() here.
731  std::ostringstream oss;
732 
733  // Timer A gets created on all MPI processes.
734  // Timer B only gets created on Proc 0.
735  RCP<Time> timerA = TimeMonitor::getNewCounter ("Timer A");
736  RCP<Time> timerB;
737  if (myRank == 0) {
738  timerB = TimeMonitor::getNewCounter ("Timer B");
739  }
740  else {
741  timerB = null; // True anyway, but I want to make this explicit.
742  }
743 
744  // The actual number of operations in the loop is proportional to
745  // the cube of the loop length. Adjust the quantities below as
746  // necessary to ensure the timer reports a nonzero elapsed time
747  // for each of the invocations.
748  const size_t timerA_loopLength = 150;
749  const size_t timerB_loopLength = 200;
750 
751  // Timer A gets a call count of 3.
752  for (size_t k = 0; k < 3; ++k) {
753  TimeMonitor monitorA (*timerA);
754  slowLoop (timerA_loopLength);
755  }
756  if (myRank == 0) { // Timer B gets a call count of 1 on Proc 0.
757  TimeMonitor monitorB (*timerB);
758  slowLoop (timerB_loopLength);
759  }
760 
761  const bool alwaysWriteLocal = false; // the default
762  const bool writeGlobalStats = true; // the default
763  const bool writeZeroTimers = true; // the default
764  TimeMonitor::summarize (oss, alwaysWriteLocal, writeGlobalStats,
765  writeZeroTimers, Intersection);
766 
767  // Echo summarize() output to the FancyOStream out (which is a
768  // standard unit test argument). Output should only appear in
769  // show-all-test-details mode.
770  out << std::endl << "Testing intersection of timers:" << std::endl
771  << oss.str() << std::endl;
772 
773  // Since setOp == Intersection, only Timer A should be reported,
774  // unless there is only one (MPI) process.
775  size_t substr_i = oss.str().find ("Timer A");
776  TEST_INEQUALITY(substr_i, std::string::npos);
777  if (numProcs > 1) {
778  substr_i = oss.str().find ("Timer B");
779  TEST_EQUALITY(substr_i, std::string::npos);
780  }
781 
782  // Now call summarize(), but ask for a union of timers.
783  std::ostringstream ossUnion;
784  TimeMonitor::summarize (ossUnion, alwaysWriteLocal, writeGlobalStats,
785  writeZeroTimers, Union);
786 
787  // Echo summarize() output to the FancyOStream out (which is a
788  // standard unit test argument). Output should only appear in
789  // show-all-test-details mode.
790  out << std::endl << "Testing union of timers:" << std::endl
791  << ossUnion.str() << std::endl;
792 
793  // Since setOp == Union, both Timer A and Timer B should be
794  // reported.
795  substr_i = ossUnion.str().find ("Timer A");
796  TEST_INEQUALITY(substr_i, std::string::npos);
797  substr_i = ossUnion.str().find ("Timer B");
798  TEST_INEQUALITY(substr_i, std::string::npos);
799 
800  // This sets up for the next unit test.
801  TimeMonitor::clearCounters ();
802  }
static Teuchos::RCP< const Comm< OrdinalType > > getComm()
Return the default global communicator.
int myRank
void char ipfint ipfint ipfint * k
Definition: IpBlas.cpp:44
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
static Teuchos::RCP< const Comm< OrdinalType > > getDefaultSerialComm(const Teuchos::RCP< const Comm< OrdinalType > > &comm)
Return a serial Comm if the input Comm is null.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [208/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
validateParametersAndSetDefaults   
)

Definition at line 715 of file ParameterList_UnitTests.cpp.

716 {
717  ParameterList PL_Main = createMainPL();
718  ParameterList PL_Main_valid = createValidMainPL();
719  ECHO(PL_Main.validateParametersAndSetDefaults(PL_Main_valid));
720  TEST_NOTHROW(
721  rcp_dynamic_cast<const StringToIntegralParameterEntryValidator<int> >(
722  PL_Main.getEntry("Nonlinear Solver").validator(), true ) );
723 }
ParameterList createMainPL()
ParameterList createValidMainPL()
Definition: gkregex.c:113
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [209/224]

Teuchos::TEUCHOS_UNIT_TEST ( ParameterList  ,
getIntegralValue_int   
)

Definition at line 726 of file ParameterList_UnitTests.cpp.

727 {
728  ParameterList PL_Main = createMainPL();
729  ParameterList PL_Main_valid = createValidMainPL();
730  ECHO(PL_Main.set("Nonlinear Solver", "Line Search Based"));
731  ECHO(PL_Main.validateParametersAndSetDefaults(PL_Main_valid));
732  ECHO(const int lineSearchValue = getIntegralValue<int>(PL_Main, "Nonlinear Solver"));
733  TEST_EQUALITY_CONST(lineSearchValue, 0);
734  ECHO(PL_Main.set("Nonlinear Solver", "Trust Region Based"));
735  ECHO(const int trustRegionValue = getIntegralValue<int>(PL_Main, "Nonlinear Solver"));
736  TEST_EQUALITY_CONST(trustRegionValue, 1);
737 }
ParameterList createMainPL()
ParameterList createValidMainPL()
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [210/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
testDepExceptions   
)

Tests the excpetions associated with Dependencies

Tesint NumberArrayLengthDependency excpetions

Definition at line 745 of file Dependencies_UnitTests.cpp.

745  {
746  RCP<ParameterList> list1 = RCP<ParameterList>(new ParameterList());
747  RCP<ParameterList> list2 = RCP<ParameterList>(new ParameterList());
748 
749  list1->set("int parameter", 4, "int parameter");
750  list1->set("double parameter", 6.0, "double parameter");
751  list1->set("string parameter", "hahahaha", "string parameter");
752  Array<double> doubleArray(10,23.0);
753  list1->set("array parameter", doubleArray, "array parameter");
754  list1->set("bool parameter", true, "bool parameter");
755 
756  RCP<AdditionFunction<int> > intFuncTester = rcp(new
757  AdditionFunction<int>(10));
758  TEST_THROW(RCP<NumberVisualDependency<int> > numValiDep =
759  rcp(
760  new NumberVisualDependency<int>(
761  list1->getEntryRCP("bool parameter"),
762  list1->getEntryRCP("double parameter"),
763  true,
764  intFuncTester)),
765  InvalidDependencyException);
766 
767  /*
768  * Testing StringVisualDepenendcy exceptions.
769  */
770  RCP<StringVisualDependency> stringVisDep;
771  TEST_THROW(stringVisDep = RCP<StringVisualDependency>(
772  new StringVisualDependency(
773  list1->getEntryRCP("double parameter"),
774  list1->getEntryRCP("int parameter"),
775  "cheese", true)),
776  InvalidDependencyException);
777 
778  /*
779  * Testing BoolVisualDependency exceptions.
780  */
781  TEST_THROW(RCP<BoolVisualDependency> boolVisDep =
782  RCP<BoolVisualDependency>(new BoolVisualDependency(
783  list1->getEntryRCP("int parameter"),
784  list1->getEntryRCP("double parameter"), false)),
785  InvalidDependencyException);
786 
789  RCP<NumberArrayLengthDependency<int, double> > numArrayLengthDep;
790  TEST_THROW(numArrayLengthDep =
791  rcp(new NumberArrayLengthDependency<int, double>(
792  list1->getEntryRCP("double parameter"),
793  list1->getEntryRCP("array parameter"))),
794  InvalidDependencyException);
795 
796  TEST_THROW(numArrayLengthDep =
797  rcp(new NumberArrayLengthDependency<int, double>(
798  list1->getEntryRCP("int parameter"),
799  list1->getEntryRCP("double parameter"))),
800  InvalidDependencyException);
801 
802  /*
803  * Testing StringValidatorDependency exceptions.
804  */
805  RCP<StringToIntegralParameterEntryValidator<int> >
806  cheeseValidator = rcp(
807  new StringToIntegralParameterEntryValidator<int>(
808  tuple<std::string>( "Swiss", "American", "Super Awesome Cheese"),
809  "Food Selector"
810  )
811  );
812 
813  RCP<StringToIntegralParameterEntryValidator<int> >
814  sodaValidator = rcp(
815  new StringToIntegralParameterEntryValidator<int>(
816  tuple<std::string>( "Pepsi", "Coke", "Kurtis Cola", "Bad Cola" ),
817  "Food Selector"
818  )
819  );
820 
821  RCP<StringToIntegralParameterEntryValidator<int> >
822  chipsValidator = rcp(
823  new StringToIntegralParameterEntryValidator<int>(
824  tuple<std::string>( "Lays", "Doritos", "Kurtis Super Awesome Brand"),
825  "Food Selector"
826  )
827  );
828 
829 
830  list1->set(
831  "string 2 parameter", "Swiss",
832  "second string parameter", cheeseValidator);
833  StringValidatorDependency::ValueToValidatorMap testValidatorMap1;
834  testValidatorMap1["Cheese"] = cheeseValidator;
835  testValidatorMap1["Soda"] = sodaValidator;
836  testValidatorMap1["Chips"] = chipsValidator;
837  TEST_THROW(RCP<StringValidatorDependency> stringValiDep =
838  RCP<StringValidatorDependency>(
839  new StringValidatorDependency(
840  list1->getEntryRCP("int parameter"),
841  list1->getEntryRCP("string 2 parameter"),
842  testValidatorMap1)),
843  InvalidDependencyException);
844  RCP<EnhancedNumberValidator<int> > intVali =
845  rcp(new EnhancedNumberValidator<int>(0,20));
846  testValidatorMap1["Candy"] = intVali;
847  TEST_THROW(RCP<StringValidatorDependency> stringValiDep =
848  RCP<StringValidatorDependency>(
849  new StringValidatorDependency(
850  list1->getEntryRCP("string parameter"),
851  list1->getEntryRCP("string 2 parameter"),
852  testValidatorMap1)),
853  InvalidDependencyException);
854 
855  StringValidatorDependency::ValueToValidatorMap emptyMap;
856  TEST_THROW(RCP<StringValidatorDependency> stringValiDep =
857  RCP<StringValidatorDependency>(
858  new StringValidatorDependency(
859  list1->getEntryRCP("string parameter"),
860  list1->getEntryRCP("string 2 parameter"),
861  emptyMap)),
862  InvalidDependencyException);
863 
864  /*
865  * Testing BoolValidatorDependency exceptions.
866  */
867  RCP<EnhancedNumberValidator<double> > doubleVali1 =
868  rcp(new EnhancedNumberValidator<double>(0.0,20.0));
869  RCP<EnhancedNumberValidator<double> > doubleVali2 =
870  rcp(new EnhancedNumberValidator<double>(5.0,20.0));
871  list1->set("double parameter", 6.0, "double parameter", doubleVali1);
872 
873  TEST_THROW(RCP<BoolValidatorDependency> boolValiDep =
874  RCP<BoolValidatorDependency>(
875  new BoolValidatorDependency(
876  list1->getEntryRCP("int parameter"),
877  list1->getEntryRCP("double parameter"),
878  doubleVali1,
879  doubleVali2)),
880  InvalidDependencyException);
881 
882  TEST_THROW(RCP<BoolValidatorDependency> boolValiDep =
883  RCP<BoolValidatorDependency>(
884  new BoolValidatorDependency(
885  list1->getEntryRCP("bool parameter"),
886  list1->getEntryRCP("double parameter"),
887  intVali,
888  doubleVali2)),
889  InvalidDependencyException);
890 
891  TEST_THROW(RCP<BoolValidatorDependency> boolValiDep =
892  RCP<BoolValidatorDependency>(
893  new BoolValidatorDependency(
894  list1->getEntryRCP("bool parameter"),
895  list1->getEntryRCP("double parameter"),
896  doubleVali1,
897  intVali)),
898  InvalidDependencyException);
899 
900  /*
901  * Testing RangeValidatorDependency exceptions.
902  */
903  list1->set("Cheese to Fondue", "Swiss", "the cheese to fondue");
904  RCP<StringToIntegralParameterEntryValidator<int> >
905  lowTempCheeseValidator = rcp(
906  new StringToIntegralParameterEntryValidator<int>(
907  tuple<std::string>( "PepperJack", "Swiss", "American" ),
908  "Cheese to Fondue"
909  )
910  );
911  RCP<StringToIntegralParameterEntryValidator<int> >
912  highTempCheeseValidator = rcp(
913  new StringToIntegralParameterEntryValidator<int>(
914  tuple<std::string>("Munster", "Provalone",
915  "Kurtis Super Awesome Cheese"),
916  "Cheese to Fondue"
917  )
918  );
919 
920  list1->set(
921  "Cheese to Fondue", "Swiss", "the cheese to fondue",
922  lowTempCheeseValidator);
923 
924  RangeValidatorDependency<double>::RangeToValidatorMap tempranges;
925  tempranges[std::pair<double,double>(100,200)] = lowTempCheeseValidator;
926  tempranges[std::pair<double,double>(200,300)] = highTempCheeseValidator;
927  TEST_THROW(
928  RCP<RangeValidatorDependency<double> >
929  cheeseTempDep = RCP<RangeValidatorDependency<double> >(
930  new RangeValidatorDependency<double>(
931  list1->getEntryRCP("string parameter"),
932  list1->getEntryRCP("Cheese to Fondue"),
933  tempranges
934  )
935  ),
936  InvalidDependencyException
937  );
938 
939  tempranges[std::pair<double,double>(400,800)] = intVali;
940  TEST_THROW(
941  RCP<RangeValidatorDependency<double> >
942  cheeseTempDep = RCP<RangeValidatorDependency<double> >(
943  new RangeValidatorDependency<double>(
944  list1->getEntryRCP("int parameter"),
945  list1->getEntryRCP("Cheese to Fondue"),
946  tempranges
947  )
948  ),
949  InvalidDependencyException
950  );
951 
952  RangeValidatorDependency<double>::RangeToValidatorMap emptyMap2;
953  TEST_THROW(
954  RCP<RangeValidatorDependency<double> >
955  emptyMapDep = RCP<RangeValidatorDependency<double> >(
956  new RangeValidatorDependency<double>(
957  list1->getEntryRCP("double parameter"),
958  list1->getEntryRCP("Cheese to Fondue"),
959  emptyMap2
960  )
961  ),
962  InvalidDependencyException
963  );
964 
965  RangeValidatorDependency<int>::RangeToValidatorMap badRanges;
966  tempranges[std::pair<int,int>(200,100)] = lowTempCheeseValidator;
967  TEST_THROW(
968  RCP<RangeValidatorDependency<int> >
969  cheeseTempDep = RCP<RangeValidatorDependency<int> >(
970  new RangeValidatorDependency<int>(
971  list1->getEntryRCP("string parameter"),
972  list1->getEntryRCP("Cheese to Fondue"),
973  badRanges
974  )
975  ),
976  InvalidDependencyException
977  );
978 }
RCP< BoolVisualDependency > boolVisDep
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [211/224]

Teuchos::TEUCHOS_UNIT_TEST ( TimeMonitor  ,
FILTER_ZERO_TIMERS_sameParallelCallCounts   
)

Definition at line 808 of file TimeMonitor_UnitTests.cpp.

809  {
810  // Store the output of TimeMonitor::summarize() here.
811  std::ostringstream oss;
812 
813  RCP<Time> timerA = TimeMonitor::getNewCounter ("Timer A");
814  RCP<Time> timerB = TimeMonitor::getNewCounter ("Timer B");
815  RCP<Time> timerC = TimeMonitor::getNewCounter ("Timer C");
816 
817  // Timers A and B get nonzero elapsed times and call counts on all
818  // (MPI) processes. Timer C never gets started, so it should have
819  // a zero elapsed time and zero call count on all processes.
820 
821  // The actual number of operations in the loop is proportional to
822  // the cube of the loop length. Adjust the quantities below as
823  // necessary to ensure the timer reports a nonzero elapsed time
824  // for each of the invocations.
825  const size_t timerA_loopLength = 200;
826  const size_t timerB_loopLength = 250;
827 
828  // Timer A gets a call count of 3.
829  for (size_t k = 0; k < 3; ++k) {
830  TimeMonitor monitorA (*timerA);
831  slowLoop (size_t (timerA_loopLength));
832  }
833  // Timer B gets a call count of 1.
834  {
835  TimeMonitor monitorB (*timerB);
836  slowLoop (size_t (timerB_loopLength));
837  }
838 
839  const bool alwaysWriteLocal = false; // the default
840  const bool writeGlobalStats = true; // the default
841  const bool writeZeroTimers = false; // NOT the default
842  TimeMonitor::summarize (oss, alwaysWriteLocal, writeGlobalStats,
843  writeZeroTimers);
844 
845  // Echo summarize() output to the FancyOStream out (which is a
846  // standard unit test argument). Output should only appear in
847  // show-all-test-details mode.
848  out << oss.str() << std::endl;
849 
850  // Timers A and B should be reported.
851  size_t substr_i = oss.str().find ("Timer A");
852  TEST_INEQUALITY(substr_i, std::string::npos);
853  substr_i = oss.str().find ("Timer B");
854  TEST_INEQUALITY(substr_i, std::string::npos);
855 
856  // Timer C should NOT be reported.
857  substr_i = oss.str().find ("Timer C");
858  TEST_EQUALITY(substr_i, std::string::npos);
859 
860  // This sets up for the next unit test.
861  TimeMonitor::clearCounters ();
862  }
void char ipfint ipfint ipfint * k
Definition: IpBlas.cpp:44
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [212/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
BoolValidatorDepSerialization   
)

Definition at line 818 of file Dependencies_SerializationTests.cpp.

818  {
819  std::string dependee1 = "bool param";
820  std::string dependee2 = "bool param2";
821  std::string dependent1 = "dependent param1";
822  std::string dependent2 = "dependent param2";
823  ParameterList myDepList("Bool Vali Dep List");
824  RCP<DependencySheet> myDepSheet = rcp(new DependencySheet);
825  myDepList.set(dependee1, true);
826  myDepList.set(dependee2, false);
827  myDepList.set(dependent1, 2.0);
828  myDepList.set(dependent2, 3.0);
829 
830  RCP<EnhancedNumberValidator<double> > true1Vali =
831  rcp(new EnhancedNumberValidator<double>(0,10));
832 
833  RCP<EnhancedNumberValidator<double> > false1Vali =
834  rcp(new EnhancedNumberValidator<double>(0,30));
835 
836  RCP<EnhancedNumberValidator<double> > true2Vali =
837  rcp(new EnhancedNumberValidator<double>(4,90));
838 
839 
840  RCP<BoolValidatorDependency> simpleBoolValiDep = rcp(
841  new BoolValidatorDependency(
842  myDepList.getEntryRCP(dependee1),
843  myDepList.getEntryRCP(dependent1),
844  true1Vali,
845  false1Vali));
846 
847  Dependency::ParameterEntryList dependentList;
848  dependentList.insert(myDepList.getEntryRCP(dependent1));
849  dependentList.insert(myDepList.getEntryRCP(dependent2));
850 
851  RCP<BoolValidatorDependency> complexBoolValiDep = rcp(
852  new BoolValidatorDependency(
853  myDepList.getEntryRCP(dependee2),
855  true2Vali));
856 
857  myDepSheet->addDependency(simpleBoolValiDep);
858  myDepSheet->addDependency(complexBoolValiDep);
859 
860  RCP<DependencySheet> readInDepSheet = rcp(new DependencySheet);
861 
862  XMLParameterListWriter plWriter;
863  XMLObject xmlOut = plWriter.toXML(myDepList, myDepSheet);
864  out << xmlOut.toString();
865 
866  RCP<ParameterList> readInList =
867  writeThenReadPL(myDepList, myDepSheet, readInDepSheet);
868 
869  RCP<ParameterEntry> readinDependee1 = readInList->getEntryRCP(dependee1);
870  RCP<ParameterEntry> readinDependent1 = readInList->getEntryRCP(dependent1);
871  RCP<ParameterEntry> readinDependee2 = readInList->getEntryRCP(dependee2);
872  RCP<ParameterEntry> readinDependent2 = readInList->getEntryRCP(dependent2);
873 
874  RCP<Dependency> readinDep1 =
875  *(readInDepSheet->getDependenciesForParameter(readinDependee1)->begin());
876 
877  RCP<Dependency> readinDep2 =
878  *(readInDepSheet->getDependenciesForParameter(readinDependee2)->begin());
879 
880  BASIC_DEPENDENCY_TEST(readinDep1, BoolValidatorDependency, 1, 1);
881  VERIFY_DEPENDEE(readinDep1, readinDependee1);
882  VERIFY_DEPENDENT(readinDep1, readinDependent1);
883 
884  BASIC_DEPENDENCY_TEST(readinDep2, BoolValidatorDependency, 1, 2);
885  VERIFY_DEPENDEE(readinDep2, readinDependee2);
886  VERIFY_DEPENDENT(readinDep2, readinDependent1);
887  VERIFY_DEPENDENT(readinDep2, readinDependent2);
888 
889 
890  RCP<BoolValidatorDependency> castedDep1 =
891  rcp_dynamic_cast<BoolValidatorDependency>(readinDep1, true);
892  RCP<BoolValidatorDependency> castedDep2 =
893  rcp_dynamic_cast<BoolValidatorDependency>(readinDep2, true);
894 
895  TEST_ASSERT(nonnull(castedDep1->getTrueValidator()));
896  TEST_ASSERT(nonnull(castedDep1->getFalseValidator()));
897  TEST_ASSERT(nonnull(castedDep2->getTrueValidator()));
898  TEST_ASSERT(castedDep2->getFalseValidator().is_null());
900  rcp_dynamic_cast<const EnhancedNumberValidator<double> >(
901  castedDep1->getTrueValidator(), true)->getMax(),
902  true1Vali->getMax());
904  rcp_dynamic_cast<const EnhancedNumberValidator<double> >(
905  castedDep1->getFalseValidator(), true)->getMax(),
906  false1Vali->getMax());
908  rcp_dynamic_cast<const EnhancedNumberValidator<double> >(
909  castedDep2->getTrueValidator(), true)->getMax(),
910  true2Vali->getMax());
911 
912 }
Dependency::ParameterEntryList dependentList
RCP< ParameterEntry > readinDependent2
TEST_ASSERT(nonnull(castedDep2->getDefaultValidator()))
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
TEST_EQUALITY(rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep2->getDefaultValidator(), true) ->getMax(), defaultVali->getMax())
RCP< ParameterEntry > readinDependee1
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
bool nonnull(const ArrayRCP< T > &p)
Returns true if p.get()!=NULL.
RCP< ParameterEntry > readinDependent1
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
VERIFY_DEPENDEE(readinDep2, readinDependee3)
RCP< ConditionVisualDependency > castedDep2
RCP< DependencySheet > myDepSheet
VERIFY_DEPENDENT(readinDep2, readinDependent1)
RCP< ConditionVisualDependency > castedDep1
RCP< Dependency > readinDep1
RCP< DependencySheet > readInDepSheet
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
ParameterList myDepList("String Vali Dep List")
RCP< Dependency > readinDep2
BASIC_DEPENDENCY_TEST(readinDep2, StringValidatorDependency, 1, 2)
out<< xmlOut.toString();RCP< ParameterList > readInList
RCP< ParameterEntry > readinDependee2
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
XMLParameterListWriter plWriter
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [213/224]

Teuchos::TEUCHOS_UNIT_TEST ( TimeMonitor  ,
FILTER_ZERO_TIMERS_differentParallelCallCounts   
)

Definition at line 869 of file TimeMonitor_UnitTests.cpp.

870  {
871  RCP<const Comm<int> > comm = Teuchos::DefaultComm<int>::getComm ();
872  const int myRank = comm->getRank ();
873 
874  // If MPI has not been initialized, turn the MPI communicator into
875  // a "serial" communicator. This may not be necessary when using
876  // the Teuchos Unit Test Framework.
877 #ifdef HAVE_MPI
878  {
879  int mpiHasBeenInitialized = 0;
880  MPI_Initialized (&mpiHasBeenInitialized);
881  if (! mpiHasBeenInitialized) {
883  }
884  }
885 #endif // HAVE_MPI
886 
887  // Store the output of TimeMonitor::summarize() here.
888  std::ostringstream oss;
889 
890  RCP<Time> timerA = TimeMonitor::getNewCounter ("Timer A");
891  RCP<Time> timerB = TimeMonitor::getNewCounter ("Timer B");
892  RCP<Time> timerC = TimeMonitor::getNewCounter ("Timer C");
893 
894  // Timer A gets a nonzero elapsed time and call count on Proc 0,
895  // but a zero elapsed time and call count elsewhere.
896  //
897  // Timer B gets the same nonzero elapsed time and call count on
898  // all MPI procs.
899  //
900  // Timer C gets a zero elapsed time and call count on all procs.
901  //
902  // The actual number of operations in the loop is proportional to
903  // the cube of the loop length. Adjust the quantities below as
904  // necessary to ensure the timer reports a nonzero elapsed time
905  // for each of the invocations.
906  const size_t timerA_loopLength = 200;
907  const size_t timerB_loopLength = 500;
908 
909  if (myRank == 0) {
910  // Timer A gets a call count of 3 on Proc 0.
911  for (int k = 0; k < 3; ++k) {
912  TimeMonitor monitorA (*timerA);
913  slowLoop (size_t (timerA_loopLength));
914  }
915  }
916 
917  // Timer B gets a call count of 1 on all procs.
918  {
919  TimeMonitor monitorB (*timerB);
920  slowLoop (size_t (timerB_loopLength));
921  }
922 
923  const bool alwaysWriteLocal = false; // the default
924  const bool writeGlobalStats = true; // the default
925  const bool writeZeroTimers = false; // NOT the default
926  TimeMonitor::summarize (oss, alwaysWriteLocal, writeGlobalStats,
927  writeZeroTimers, Union);
928 
929  // Echo summarize() output to the FancyOStream out (which is a
930  // standard unit test argument). Output should only appear in
931  // show-all-test-details mode.
932  out << oss.str() << std::endl;
933 
934  // Timers A and B should both be reported.
935  size_t substr_i = oss.str().find ("Timer A");
936  TEST_INEQUALITY(substr_i, std::string::npos);
937  substr_i = oss.str().find ("Timer B");
938  TEST_INEQUALITY(substr_i, std::string::npos);
939 
940  // Timer C should NOT be reported.
941  substr_i = oss.str().find ("Timer C");
942  TEST_EQUALITY(substr_i, std::string::npos);
943 
944  // This sets up for the next unit test (if there is one).
945  TimeMonitor::clearCounters ();
946  }
static Teuchos::RCP< const Comm< OrdinalType > > getComm()
Return the default global communicator.
int myRank
void char ipfint ipfint ipfint * k
Definition: IpBlas.cpp:44
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
static Teuchos::RCP< const Comm< OrdinalType > > getDefaultSerialComm(const Teuchos::RCP< const Comm< OrdinalType > > &comm)
Return a serial Comm if the input Comm is null.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [214/224]

Teuchos::TEUCHOS_UNIT_TEST ( TimeMonitor  ,
IgnoreMissingTimers   
)

Definition at line 951 of file TimeMonitor_UnitTests.cpp.

952  {
953  RCP<const Comm<int> > comm = Teuchos::DefaultComm<int>::getComm ();
954  const int myRank = comm->getRank ();
955 
956 #ifdef HAVE_MPI
957  {
958  int mpiHasBeenInitialized = 0;
959  MPI_Initialized (&mpiHasBeenInitialized);
960  if (! mpiHasBeenInitialized) {
962  }
963  }
964 #endif // HAVE_MPI
965 
966  // Store the output of TimeMonitor::summarize() here.
967  std::ostringstream oss;
968 
969  std::string timerName="Timer Z";
970  // Timer Z appears on all PIDs except 0.
971  {
972  switch (myRank) {
973  case 1 :
974  break;
975  case 0 :
976  {
977  RCP<Time> timer = TimeMonitor::getNewCounter (timerName);
978  TimeMonitor monitor (*timer);
979  sleep(1);
980  }
981  break;
982  case 2 :
983  {
984  RCP<Time> timer = TimeMonitor::getNewCounter (timerName);
985  TimeMonitor monitor (*timer);
986  sleep(1);
987  }
988  break;
989  default :
990  {
991  RCP<Time> timer = TimeMonitor::getNewCounter (timerName);
992  TimeMonitor monitor (*timer);
993  sleep(1);
994  }
995  }
996  }
997 
999  // test two versions of summarize with default behavior
1001 
1002  //version 1, comm provided
1003  const bool alwaysWriteLocal = false;
1004  const bool writeGlobalStats = true;
1005  const bool writeZeroTimers = false;
1006  bool ignoreMissingTimers = false; // the default
1007  std::string filter = "";
1008  TimeMonitor::summarize (comm.ptr(), oss, alwaysWriteLocal, writeGlobalStats,
1009  writeZeroTimers, Union, filter, ignoreMissingTimers);
1010 
1011  // Echo summarize() output to the FancyOStream out (which is a
1012  // standard unit test argument). Output should only appear in
1013  // show-all-test-details mode.
1014  out << oss.str() << std::endl;
1015 
1016  if (comm->getSize() > 1) {
1017  // The min should be 0
1018  size_t substr_i = oss.str().find ("0 (0)");
1019  TEST_INEQUALITY(substr_i, std::string::npos);
1020  }
1021 
1022  //version 2, no comm provided
1023  std::ostringstream oss2;
1024  TimeMonitor::summarize (oss2, alwaysWriteLocal, writeGlobalStats,
1025  writeZeroTimers, Union, filter, ignoreMissingTimers);
1026  out << oss2.str() << std::endl;
1027  if (comm->getSize() > 1) {
1028  // The min should be 0
1029  size_t substr_i = oss2.str().find ("0 (0)");
1030  TEST_INEQUALITY(substr_i, std::string::npos);
1031  }
1032 
1034  // test two versions of summarize with *non* default behavior
1036  //version 1, comm provided
1037  ignoreMissingTimers = true; // NOT the default
1038  std::ostringstream oss3;
1039  TimeMonitor::summarize (comm.ptr(), oss3, alwaysWriteLocal, writeGlobalStats,
1040  writeZeroTimers, Union, filter, ignoreMissingTimers);
1041  out << oss3.str() << std::endl;
1042 
1043  // The min should be different from 0
1044  size_t substr_i = oss3.str().find ("0 (0)");
1045  TEST_EQUALITY(substr_i, std::string::npos);
1046 
1047  //version 2, no comm provided
1048  std::ostringstream oss4;
1049  TimeMonitor::summarize (oss4, alwaysWriteLocal, writeGlobalStats,
1050  writeZeroTimers, Union, filter, ignoreMissingTimers);
1051  out << oss4.str() << std::endl;
1052  // The min should be different from 0
1053  substr_i = oss4.str().find ("0 (0)");
1054  TEST_EQUALITY(substr_i, std::string::npos);
1055 
1056  // This sets up for the next unit test (if there is one).
1057  TimeMonitor::clearCounters ();
1058  }
static Teuchos::RCP< const Comm< OrdinalType > > getComm()
Return the default global communicator.
int myRank
void sleep(int sec)
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
static Teuchos::RCP< const Comm< OrdinalType > > getDefaultSerialComm(const Teuchos::RCP< const Comm< OrdinalType > > &comm)
Return a serial Comm if the input Comm is null.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [215/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
DepSheetTest   
)

Tests various DependencySheet functions.

Definition at line 983 of file Dependencies_UnitTests.cpp.

983  {
984  RCP<DependencySheet> depSheet1 = rcp(new DependencySheet);
985  RCP<BoolVisualDependency> boolDep1 =
986  DummyObjectGetter<BoolVisualDependency>::getDummyObject();
987  TEST_ASSERT(depSheet1->empty());
988  depSheet1->addDependency(boolDep1);
989  TEST_ASSERT(!depSheet1->empty());
990 
991 
992  RCP<DependencySheet> depSheet2 = rcp(new DependencySheet);
993  RCP<StringVisualDependency> stringDep1 =
994  DummyObjectGetter<StringVisualDependency>::getDummyObject();
995  depSheet1->addDependency(stringDep1);
996  RCP<StringValidatorDependency> stringValiDep1 =
997  DummyObjectGetter<StringValidatorDependency>::getDummyObject();
998  depSheet1->addDependency(stringValiDep1);
999 
1000  depSheet1->addDependencies(depSheet2);
1001  TEST_EQUALITY_CONST(depSheet1->size(), 3);
1002  bool found1 = false;
1003  bool found2 = false;
1004  bool found3 = false;
1005  for(
1006  DependencySheet::DepSet::iterator it = depSheet1->depBegin();
1007  it != depSheet1->depEnd();
1008  ++it
1009  )
1010  {
1011  if(*it == boolDep1){
1012  found1 = true;
1013  }
1014  else if(*it == stringDep1){
1015  found2 = true;
1016  }
1017  else if(*it == stringValiDep1){
1018  found3 = true;
1019  }
1020  }
1021  TEST_ASSERT(found1);
1022  TEST_ASSERT(found2);
1023  TEST_ASSERT(found3);
1024 }
RCP< DependencySheet > depSheet1
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [216/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
NumberVisualDepSerializationExceptions   
)

Definition at line 1103 of file Dependencies_SerializationTests.cpp.

1103  {
1104 
1105  EXCEPTION_TEST_BOILERPLATE(4, "blah");
1106  RCP<Dependency> numVisDep =
1107  rcp(new NumberVisualDependency<int>(dependeeParam1, dependentParam1));
1108  CONVERT_DEP_TO_XML(numVisDep);
1109  TOO_MANY_DEPENDEE_TEST(numVisDep);
1110 
1111 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [217/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
BoolVisualDepSerializationExceptions   
)

Definition at line 1113 of file Dependencies_SerializationTests.cpp.

1113  {
1114  EXCEPTION_TEST_BOILERPLATE(true, "blah");
1115  RCP<Dependency> boolVisDep =
1116  rcp(new BoolVisualDependency(dependeeParam1, dependentParam1));
1117  CONVERT_DEP_TO_XML(boolVisDep);
1118  TOO_MANY_DEPENDEE_TEST(boolVisDep);
1119 }
RCP< BoolVisualDependency > boolVisDep
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [218/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
StringVisualDepSerializationExceptions   
)

Definition at line 1121 of file Dependencies_SerializationTests.cpp.

1122 {
1123  EXCEPTION_TEST_BOILERPLATE(std::string("balh"), 4);
1124  RCP<Dependency> stringVisDep =
1125  rcp(new StringVisualDependency(dependeeParam1, dependentParam1, "steve"));
1126  CONVERT_DEP_TO_XML(stringVisDep);
1127  TOO_MANY_DEPENDEE_TEST(stringVisDep);
1128 
1129  COPY_DEPTAG_WITHOUT_CHILD(
1130  stringVisDepXML,
1131  StringVisualDependencyXMLConverter::getStringValuesTagName(),
1132  missingValuesXML);
1133 
1134  TEST_THROW(
1135  DependencyXMLConverterDB::convertXML(
1136  missingValuesXML, readerEntryMap, readerValiMap),
1137  ValuesTagMissingException);
1138 
1139 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(boolVisConverter.fromDependencytoXML(boolVisDep, entryIDsMap, validatorIDsMap), MissingDependentException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [219/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
ConditionVisualDepSerializationExceptions   
)

Definition at line 1141 of file Dependencies_SerializationTests.cpp.

1143 {
1144  EXCEPTION_TEST_BOILERPLATE(true, 4);
1145  RCP<Condition> boolCon = rcp(new BoolCondition(dependeeParam1));
1146  RCP<Dependency> conVisDep =
1147  rcp(new ConditionVisualDependency(boolCon, dependentParam1));
1148  CONVERT_DEP_TO_XML(conVisDep);
1149  COPY_DEPTAG_WITHOUT_CHILD(
1150  conVisDepXML,
1151  Condition::getXMLTagName(),
1152  missingConXML);
1153 
1154  TEST_THROW(
1155  DependencyXMLConverterDB::convertXML(
1156  missingConXML, readerEntryMap, readerValiMap),
1157  MissingConditionTagException);
1158 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
RCP< BoolCondition > boolCon
TEST_THROW(boolVisConverter.fromDependencytoXML(boolVisDep, entryIDsMap, validatorIDsMap), MissingDependentException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [220/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
BoolValidatorDepSerializationExceptions   
)

Definition at line 1160 of file Dependencies_SerializationTests.cpp.

1162 {
1163  EXCEPTION_TEST_BOILERPLATE(true, 7);
1164  RCP<EnhancedNumberValidator<int> > trueVali =
1165  rcp(new EnhancedNumberValidator<int>);
1166  RCP<EnhancedNumberValidator<int> > falseVali =
1167  rcp(new EnhancedNumberValidator<int>);
1168  INSERT_VALIDATOR_TO_MAPS(trueVali);
1169  INSERT_VALIDATOR_TO_MAPS(falseVali);
1170  RCP<Dependency> boolValiDep =
1171  rcp(new BoolValidatorDependency(
1172  dependeeParam1,
1173  dependentParam1,
1174  trueVali,
1175  falseVali));
1176  CONVERT_DEP_TO_XML(boolValiDep);
1177  TOO_MANY_DEPENDEE_TEST(boolValiDep);
1178 
1179  readerValiMap.erase(writerValiMap.find(trueVali)->second);
1180 
1181  TEST_THROW(
1182  DependencyXMLConverterDB::convertXML(
1183  boolValiDepXML, readerEntryMap, readerValiMap),
1184  MissingValidatorException);
1185 
1186  readerValiMap.insert( IDtoValidatorMap::IDValidatorPair(
1187  writerValiMap.find(trueVali)->second, trueVali));
1188  readerValiMap.erase(writerValiMap.find(falseVali)->second);
1189 
1190  TEST_THROW(
1191  DependencyXMLConverterDB::convertXML(
1192  boolValiDepXML, readerEntryMap, readerValiMap),
1193  MissingValidatorException);
1194 
1195 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(boolVisConverter.fromDependencytoXML(boolVisDep, entryIDsMap, validatorIDsMap), MissingDependentException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [221/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
StringValidatorDepSerializationExceptions   
)

Definition at line 1197 of file Dependencies_SerializationTests.cpp.

1199 {
1200  EXCEPTION_TEST_BOILERPLATE(std::string("blah"), 4);
1201  RCP<FileNameValidator> scrapVali =
1202  DummyObjectGetter<FileNameValidator>::getDummyObject();
1203  RCP<FileNameValidator> scrapVali2 =
1204  DummyObjectGetter<FileNameValidator>::getDummyObject();
1205  StringValidatorDependency::ValueToValidatorMap valiMap;
1206  valiMap["blah"] = scrapVali;
1207  INSERT_VALIDATOR_TO_MAPS(scrapVali);
1208  INSERT_VALIDATOR_TO_MAPS(scrapVali2);
1209 
1210  RCP<Dependency> stringValiDep =
1211  rcp( new StringValidatorDependency(
1212  dependeeParam1, dependentParam1, valiMap, scrapVali2));
1213  CONVERT_DEP_TO_XML(stringValiDep);
1214 
1215  TOO_MANY_DEPENDEE_TEST(stringValiDep);
1216 
1217  COPY_DEPTAG_WITHOUT_CHILD(
1218  stringValiDepXML,
1219  StringValidatorDependencyXMLConverter::getValuesAndValidatorsTag(),
1220  missingValuesXML);
1221 
1222  TEST_THROW(
1223  DependencyXMLConverterDB::convertXML(
1224  missingValuesXML, readerEntryMap, readerValiMap),
1225  MissingValuesAndValidatorsTagException);
1226 
1227  readerValiMap.erase(writerValiMap.find(scrapVali)->second);
1228 
1229  TEST_THROW(
1230  DependencyXMLConverterDB::convertXML(
1231  stringValiDepXML, readerEntryMap, readerValiMap),
1232  MissingValidatorException);
1233 
1234  readerValiMap.insert( IDtoValidatorMap::IDValidatorPair(
1235  writerValiMap.find(scrapVali)->second,scrapVali));
1236  readerValiMap.erase(writerValiMap.find(scrapVali2)->second);
1237 
1238  TEST_THROW(
1239  DependencyXMLConverterDB::convertXML(
1240  stringValiDepXML, readerEntryMap, readerValiMap),
1241  MissingValidatorException);
1242 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(boolVisConverter.fromDependencytoXML(boolVisDep, entryIDsMap, validatorIDsMap), MissingDependentException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [222/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
RangeValidatorDepSerializationExceptions   
)

Definition at line 1244 of file Dependencies_SerializationTests.cpp.

1246 {
1247  EXCEPTION_TEST_BOILERPLATE(3, "blah");
1248 
1249  RCP<FileNameValidator> scrapVali =
1250  DummyObjectGetter<FileNameValidator>::getDummyObject();
1251  RCP<FileNameValidator> otherScrapVali =
1252  DummyObjectGetter<FileNameValidator>::getDummyObject();
1253  RCP<FileNameValidator> defaultScrapVali =
1254  DummyObjectGetter<FileNameValidator>::getDummyObject();
1255  RangeValidatorDependency<int>::RangeToValidatorMap valiMap;
1256  RangeValidatorDependency<int>::RangeToValidatorMap secondvaliMap;
1257  RangeValidatorDependency<int>::Range scrapRange(2,5);
1258  valiMap[scrapRange] = scrapVali;
1259  secondvaliMap[scrapRange] = otherScrapVali;
1260  writerValiMap.insert(scrapVali);
1261  writerValiMap.insert(otherScrapVali);
1262  writerValiMap.insert(defaultScrapVali);
1263  readerValiMap.insert(
1264  IDtoValidatorMap::IDValidatorPair(
1265  writerValiMap.find(scrapVali)->second,scrapVali));
1266  readerValiMap.insert(
1267  IDtoValidatorMap::IDValidatorPair(
1268  writerValiMap.find(otherScrapVali)->second,otherScrapVali));
1269  readerValiMap.insert(
1270  IDtoValidatorMap::IDValidatorPair(
1271  writerValiMap.find(defaultScrapVali)->second,defaultScrapVali));
1272 
1273  RCP<Dependency> rangeDep =
1274  rcp(new RangeValidatorDependency<int>(
1275  dependeeParam1, dependentParam1, valiMap));
1276 
1277  RCP<Dependency> rangeDefaultDep =
1278  rcp(new RangeValidatorDependency<int>(
1279  dependeeParam1, dependentParam1, secondvaliMap, defaultScrapVali));
1280 
1281  CONVERT_DEP_TO_XML(rangeDep);
1282  CONVERT_DEP_TO_XML(rangeDefaultDep);
1283 
1284  TOO_MANY_DEPENDEE_TEST(rangeDep);
1285 
1286  COPY_DEPTAG_WITHOUT_CHILD(
1287  rangeDepXML,
1288  RangeValidatorDependencyXMLConverter<int>::getRangesAndValidatorsTag(),
1289  missingRangesXML
1290  )
1291 
1292  TEST_THROW(
1293  DependencyXMLConverterDB::convertXML(
1294  missingRangesXML, readerEntryMap, readerValiMap),
1295  MissingRangesAndValidatorsTagException);
1296 
1297  readerValiMap.erase(writerValiMap.find(scrapVali)->second);
1298 
1299  TEST_THROW(
1300  DependencyXMLConverterDB::convertXML(
1301  rangeDepXML, readerEntryMap, readerValiMap),
1302  MissingValidatorException);
1303 
1304  readerValiMap.erase(writerValiMap.find(defaultScrapVali)->second);
1305  TEST_THROW(
1306  DependencyXMLConverterDB::convertXML(
1307  rangeDefaultDepXML, readerEntryMap, readerValiMap),
1308  MissingValidatorException);
1309 
1310 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_THROW(boolVisConverter.fromDependencytoXML(boolVisDep, entryIDsMap, validatorIDsMap), MissingDependentException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [223/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
NumArrayLengthDepSerializationExceptions   
)

Definition at line 1312 of file Dependencies_SerializationTests.cpp.

1314 {
1315  EXCEPTION_TEST_BOILERPLATE(4, Array<double>(4, 3.0));
1316  RCP<Dependency> numArrayLengthDep =
1317  rcp(new NumberArrayLengthDependency<int, double>(
1318  dependeeParam1, dependentParam1));
1319  CONVERT_DEP_TO_XML(numArrayLengthDep);
1320  TOO_MANY_DEPENDEE_TEST(numArrayLengthDep);
1321 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST() [224/224]

Teuchos::TEUCHOS_UNIT_TEST ( Teuchos_Dependencies  ,
DepSheetTests   
)

Specific DependencySheet tests

Definition at line 1324 of file Dependencies_SerializationTests.cpp.

1326 {
1327  ParameterList myDepList("String Visual Dep List");
1328  std::string dependee1 = "dependee1";
1329  std::string dependent1 = "dependent1";
1330  RCP<DependencySheet> myDepSheet = rcp(new DependencySheet("My List"));
1331  myDepList.set(dependee1, "val1");
1332  myDepList.set(dependent1, 2.0);
1333  StringVisualDependency::ValueList valList1 = tuple<std::string>("val1");
1334  RCP<StringVisualDependency> basicStringVisDep = rcp(
1335  new StringVisualDependency(
1336  myDepList.getEntryRCP(dependee1),
1337  myDepList.getEntryRCP(dependent1),
1338  valList1));
1339  myDepSheet->addDependency(basicStringVisDep);
1340 
1341  RCP<DependencySheet> readInDepSheet = rcp(new DependencySheet);
1342 
1343  XMLParameterListWriter plWriter;
1344  XMLObject xmlOut = plWriter.toXML(myDepList, myDepSheet);
1345  out << xmlOut.toString();
1346 
1347  RCP<ParameterList> readInList =
1348  writeThenReadPL(myDepList, myDepSheet, readInDepSheet);
1349  TEST_EQUALITY(readInDepSheet->getName(), myDepSheet->getName());
1350 }
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
TEST_EQUALITY(rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep2->getDefaultValidator(), true) ->getMax(), defaultVali->getMax())
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
RCP< DependencySheet > myDepSheet
RCP< DependencySheet > readInDepSheet
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
ParameterList myDepList("String Vali Dep List")
out<< xmlOut.toString();RCP< ParameterList > readInList
XMLParameterListWriter plWriter
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [1/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Teuchos_Conditions  ,
NumberConditionSerialization  ,
 
)

Definition at line 173 of file Condition_Serialization_UnitTests.cpp.

173  {
174  ConditionXMLConverterDB::printKnownConverters(out);
175  std::string paramName1 = "T param";
176  std::string paramName2 = "T param 2";
177  std::string dependent1Name = "dependent1";
178  std::string dependent2Name = "dependent2";
179  T paramValue = ScalarTraits< T >::one();
180  T ten = 10 * ScalarTraits< T >::one();
181  std::string dependentValue = "hi there!";
182  ParameterList testList("Condition Test List");
183  testList.set(paramName1, paramValue);
184  testList.set(paramName2, paramValue);
185  testList.set(dependent1Name, dependentValue);
186  testList.set(dependent2Name, dependentValue);
187 
188  RCP<NumberCondition< T > > numberCon =
189  rcp(new NumberCondition< T >(testList.getEntryRCP(paramName1)));
190 
191  RCP<SubtractionFunction< T > > funcTester =
192  rcp(new SubtractionFunction< T >(ten));
193 
194  RCP<NumberCondition< T > > numberFuncCon =
195  rcp(new NumberCondition< T >(testList.getEntryRCP(paramName2), funcTester));
196 
197  RCP<ConditionVisualDependency> numberConDep =
198  rcp(new ConditionVisualDependency(
199  numberCon,
200  testList.getEntryRCP(dependent1Name)));
201 
202  RCP<ConditionVisualDependency> funcNumberConDep =
203  rcp(new ConditionVisualDependency(
204  numberFuncCon,
205  testList.getEntryRCP(dependent2Name)));
206 
207  RCP<DependencySheet> depSheet1 = rcp(new DependencySheet);
208  depSheet1->addDependency(numberConDep);
209  depSheet1->addDependency(funcNumberConDep);
210 
211  RCP<DependencySheet> depSheetIn = rcp(new DependencySheet);
212  RCP<ParameterList> readinList =
213  writeThenReadPL(testList, depSheet1, depSheetIn);
214 
215  RCP<ParameterEntry> readInDependee1 = readinList->getEntryRCP(paramName1);
216  RCP<ParameterEntry> readInDependee2 = readinList->getEntryRCP(paramName2);
217 
218 
219 
220 
221  RCP<ConditionVisualDependency> simpleReadInDep =
222  rcp_dynamic_cast<ConditionVisualDependency>(
223  *(depSheetIn->getDependenciesForParameter(readInDependee1)->begin()));
225  simpleReadInDep->getCondition()->getTypeAttributeValue(),
226  DummyObjectGetter<NumberCondition< T > >::getDummyObject()->getTypeAttributeValue());
227  RCP<const NumberCondition< T > > simpleReadInCon =
228  rcp_dynamic_cast<const NumberCondition< T > >(simpleReadInDep->getCondition(), true);
229  TEST_ASSERT(nonnull(simpleReadInCon));
230 
231 
232  RCP<ConditionVisualDependency> funcReadInDep =
233  rcp_dynamic_cast<ConditionVisualDependency>(
234  *(depSheetIn->getDependenciesForParameter(readInDependee2)->begin()));
235  TEST_ASSERT(funcReadInDep != null);
236 
237  RCP<const NumberCondition< T > > funcReadInCon =
238  rcp_dynamic_cast<const NumberCondition< T > >(funcReadInDep->getCondition());
239 
240  TEST_ASSERT(funcReadInCon != null);
241 
242  RCP<const SubtractionFunction< T > > funcReadInFunc =
243  rcp_dynamic_cast<const SubtractionFunction< T > >(
244  funcReadInCon->getFunctionObject());
245  TEST_ASSERT(funcReadInFunc != null);
247  funcReadInFunc->getModifiyingOperand(),
248  funcTester->getModifiyingOperand());
249 
250 
251 }
RCP< DependencySheet > depSheet1
RCP< DependencySheet > depSheetIn
ParameterList testList("Condition Test List")
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
bool nonnull(const ArrayRCP< T > &p)
Returns true if p.get()!=NULL.
RCP< ParameterList > readinList
TEST_EQUALITY(readInDep1->getCondition() ->getTypeAttributeValue(), DummyObjectGetter< NotCondition >::getDummyObject() ->getTypeAttributeValue())
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
RCP< ParameterEntry > readInDependee2
real(double), parameter one
Definition: Parameters.f90:27
TEST_ASSERT(readInConList.size()==2)
RCP< ParameterEntry > readInDependee1
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
RCP< NumberCondition< int > > numberCon
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [2/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Teuchos_Validator  ,
EnhancedNumberValidatorConverter  ,
 
)

Definition at line 254 of file Validator_SerializationTest.cpp.

255 {
256  std::string xmlFileName = TypeNameTraits<T>::name() + "EnhancedValidatorList.xml";
257  std::string defaultParameterName = "default";
258  std::string minmaxParameterName = "min max";
259  std::string stepPrecParameterName = "step and prec";
260  ParameterList myList;
261  RCP<EnhancedNumberValidator< T > > defaultValidator =
262  rcp( new EnhancedNumberValidator< T >());
263  RCP<EnhancedNumberValidator< T > > minMaxValidator =
264  rcp( new EnhancedNumberValidator< T >(0,10));
265  RCP<EnhancedNumberValidator< T > > stepAndPrecValidator =
266  rcp( new EnhancedNumberValidator< T >(0,10,4,4));
267  myList.set(defaultParameterName, ( T )6, "parameter with default validator",
268  defaultValidator);
269  myList.set(minmaxParameterName, ( T )10, "parameter with min and max validator",
270  minMaxValidator);
271  myList.set(stepPrecParameterName, ( T )10, "parameter with min, max, "
272  "step, and prec validator",
273  stepAndPrecValidator);
274 
275  RCP<ParameterList> readInPL = writeThenReadPL(myList);
276 
278  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
279  readInPL->getEntry(defaultParameterName).validator(), true)->getMin(),
280  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
281  myList.getEntry(defaultParameterName).validator(), true)->getMin()
282  );
284  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
285  readInPL->getEntry(defaultParameterName).validator(), true)->getMax(),
286  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
287  myList.getEntry(defaultParameterName).validator(), true)->getMax()
288  );
290  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
291  readInPL->getEntry(defaultParameterName).validator(), true)->getStep()
292  ,
293  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
294  myList.getEntry(defaultParameterName).validator(), true)->getStep()
295  );
297  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
298  readInPL->getEntry(
299  defaultParameterName).validator(), true)->getPrecision(),
300  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
301  myList.getEntry(
302  defaultParameterName).validator(), true)->getPrecision()
303  );
305  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
306  readInPL->getEntry(defaultParameterName).validator(), true)->hasMin(),
307  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
308  myList.getEntry(defaultParameterName).validator(), true)->hasMin()
309  );
311  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
312  readInPL->getEntry(defaultParameterName).validator(), true)->hasMax(),
313  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
314  myList.getEntry(defaultParameterName).validator(), true)->hasMax()
315  );
316 
318  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
319  readInPL->getEntry(minmaxParameterName).validator(), true)->getMin(),
320  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
321  myList.getEntry(minmaxParameterName).validator(), true)->getMin()
322  );
324  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
325  readInPL->getEntry(minmaxParameterName).validator(), true)->getMax(),
326  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
327  myList.getEntry(minmaxParameterName).validator(), true)->getMax()
328  );
330  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
331  readInPL->getEntry(minmaxParameterName).validator(), true)->getStep(),
332  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
333  myList.getEntry(minmaxParameterName).validator(), true)->getStep()
334  );
336  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
337  readInPL->getEntry(
338  minmaxParameterName).validator(), true)->getPrecision(),
339  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
340  myList.getEntry(
341  minmaxParameterName).validator(), true)->getPrecision()
342  );
344  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
345  readInPL->getEntry(minmaxParameterName).validator(), true)->hasMin(),
346  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
347  myList.getEntry(minmaxParameterName).validator(), true)->hasMin()
348  );
350  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
351  readInPL->getEntry(minmaxParameterName).validator(), true)->hasMax(),
352  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
353  myList.getEntry(minmaxParameterName).validator(), true)->hasMax()
354  );
355 
357  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
358  readInPL->getEntry(stepPrecParameterName).validator(), true)->getMin(),
359  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
360  myList.getEntry(stepPrecParameterName).validator(), true)->getMin()
361  );
363  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
364  readInPL->getEntry(stepPrecParameterName).validator(), true)->getMax(),
365  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
366  myList.getEntry(stepPrecParameterName).validator(), true)->getMax()
367  );
369  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
370  readInPL->getEntry(stepPrecParameterName).validator(), true)->getStep()
371  ,
372  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
373  myList.getEntry(stepPrecParameterName).validator(), true)->getStep()
374  );
376  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
377  readInPL->getEntry(
378  stepPrecParameterName).validator(), true)->getPrecision(),
379  rcp_dynamic_cast<const EnhancedNumberValidator< T > >(
380  myList.getEntry(
381  stepPrecParameterName).validator(), true)->getPrecision());
382 
383 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
char * name
Definition: lp_lib.h:823
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [3/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
basicConstruct_owns_mem  ,
 
)

Definition at line 323 of file RCPNodeHandle_UnitTests.cpp.

324 {
325  T *p = 0;
326  RCPNodeHandle nodeRef(basicRCPNodeHandle<T>(true, &p));
327  TEST_EQUALITY_CONST( nodeRef.count(), 1 );
328  TEST_EQUALITY_CONST( nodeRef.has_ownership(), true );
329  nodeRef.has_ownership(false);
330  TEST_EQUALITY_CONST( nodeRef.has_ownership(), false );
331 #ifdef TEUCHOS_DEBUG
332  TEST_INEQUALITY_CONST( nodeRef.get_base_obj_map_key_void_ptr(), static_cast<void*>(0) );
333  TEST_EQUALITY( nodeRef.get_base_obj_map_key_void_ptr(), static_cast<void*>(p) );
334  TEST_THROW({any &a = nodeRef.get_extra_data("int","blob"); (void)a;},
335  std::invalid_argument);
336  TEST_THROW({const any &a = getConst(nodeRef).get_extra_data("int","blob"); (void)a;},
337  std::invalid_argument);
338 #endif // TEUCHOS_DEBUG
339  TEST_EQUALITY_CONST(nodeRef.get_optional_extra_data("int","blob"), 0);
340  TEST_EQUALITY_CONST(getConst(nodeRef).get_optional_extra_data("int","blob"), 0);
341  nodeRef.has_ownership(true);
342 }
GC_API void(GC_CALLBACK *GC_same_obj_print_proc)(void *
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
T1 * get_optional_extra_data(ArrayRCP< T2 > &p, const std::string &name)
Get a pointer to non-const extra data (if it exists) associated with a ArrayRCP object.
struct a_s a
Definition: IpBlas.cpp:40
mchunkptr p
Definition: g++malloc.c:1207
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Definition: gkregex.c:113
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [4/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Teuchos_Dependencies  ,
NumberVisualDepSerialization  ,
 
)

Definition at line 328 of file Dependencies_SerializationTests.cpp.

332 {
333  std::string dependee1 = "num param";
334  std::string dependee2 = "num param2";
335  std::string dependent1 = "dependent param1";
336  std::string dependent2 = "dependent param2";
337  ParameterList myDepList("Number Visual Dep List");
338  RCP<DependencySheet> myDepSheet = rcp(new DependencySheet);
339  myDepList.set(dependee1, ScalarTraits<T>::one());
340  myDepList.set(dependee2, ScalarTraits<T>::one());
341  myDepList.set(dependent1, true);
342  myDepList.set(dependent2, "vale");
343 
344  RCP<NumberVisualDependency<T> > simpleNumVisDep = rcp(
345  new NumberVisualDependency<T>(
346  myDepList.getEntryRCP(dependee1),
347  myDepList.getEntryRCP(dependent1)));
348 
349  Dependency::ParameterEntryList dependentList;
350  dependentList.insert(myDepList.getEntryRCP(dependent1));
351  dependentList.insert(myDepList.getEntryRCP(dependent2));
352 
353  T ten = ScalarTraits<T>::one() *10;
354  RCP<SubtractionFunction<T> > subFunction = rcp(new SubtractionFunction<T>(ten));
355  RCP<NumberVisualDependency<T> > complexNumVisDep = rcp(
356  new NumberVisualDependency<T>(
357  myDepList.getEntryRCP(dependee2),
359  true,
360  subFunction));
361 
362  myDepSheet->addDependency(simpleNumVisDep);
363  myDepSheet->addDependency(complexNumVisDep);
364 
365  RCP<DependencySheet> readInDepSheet = rcp(new DependencySheet);
366 
367  XMLParameterListWriter plWriter;
368  XMLObject xmlOut = plWriter.toXML(myDepList, myDepSheet);
369  out << xmlOut.toString();
370 
371  RCP<ParameterList> readInList =
372  writeThenReadPL(myDepList, myDepSheet, readInDepSheet);
373 
374  RCP<ParameterEntry> readinDependee1 = readInList->getEntryRCP(dependee1);
375  RCP<ParameterEntry> readinDependent1 = readInList->getEntryRCP(dependent1);
376  RCP<ParameterEntry> readinDependee2 = readInList->getEntryRCP(dependee2);
377  RCP<ParameterEntry> readinDependent2 = readInList->getEntryRCP(dependent2);
378 
379  RCP<Dependency> readinDep1 =
380  *(readInDepSheet->getDependenciesForParameter(readinDependee1)->begin());
381 
382  RCP<Dependency> readinDep2 =
383  *(readInDepSheet->getDependenciesForParameter(readinDependee2)->begin());
384 
385  BASIC_DEPENDENCY_TEST(readinDep1, NumberVisualDependency<T>, 1, 1);
386  VERIFY_DEPENDEE(readinDep1, readinDependee1);
387  VERIFY_DEPENDENT(readinDep1, readinDependent1);
388 
389  BASIC_DEPENDENCY_TEST(readinDep2, NumberVisualDependency<T>, 1, 2);
390  VERIFY_DEPENDEE(readinDep2, readinDependee2);
391  VERIFY_DEPENDENT(readinDep2, readinDependent1);
392  VERIFY_DEPENDENT(readinDep2, readinDependent2);
393 
394 
395  RCP<NumberVisualDependency<T> > castedDep1 =
396  rcp_dynamic_cast<NumberVisualDependency<T> >(readinDep1, true);
397  RCP<NumberVisualDependency<T> > castedDep2 =
398  rcp_dynamic_cast<NumberVisualDependency<T> >(readinDep2, true);
399 
400  TEST_EQUALITY(castedDep1->getShowIf(), simpleNumVisDep->getShowIf());
401  TEST_EQUALITY(castedDep2->getShowIf(), complexNumVisDep->getShowIf());
402 
403  RCP<const SimpleFunctionObject<T> > functionObject =
404  castedDep2->getFunctionObject();
405  TEST_ASSERT(functionObject != null);
406  RCP<const SubtractionFunction<T> > castedFunction =
407  rcp_dynamic_cast<const SubtractionFunction<T> >(functionObject);
408  TEST_ASSERT(castedFunction != null);
410  castedFunction->getModifiyingOperand(),
411  subFunction->getModifiyingOperand());
412 }
Dependency::ParameterEntryList dependentList
RCP< ParameterEntry > readinDependent2
TEST_ASSERT(nonnull(castedDep2->getDefaultValidator()))
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
TEST_EQUALITY(rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep2->getDefaultValidator(), true) ->getMax(), defaultVali->getMax())
RCP< ParameterEntry > readinDependee1
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
RCP< ParameterEntry > readinDependent1
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
real(double), parameter one
Definition: Parameters.f90:27
VERIFY_DEPENDEE(readinDep2, readinDependee3)
RCP< ConditionVisualDependency > castedDep2
RCP< DependencySheet > myDepSheet
VERIFY_DEPENDENT(readinDep2, readinDependent1)
RCP< ConditionVisualDependency > castedDep1
RCP< Dependency > readinDep1
RCP< DependencySheet > readInDepSheet
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
ParameterList myDepList("String Vali Dep List")
RCP< Dependency > readinDep2
BASIC_DEPENDENCY_TEST(readinDep2, StringValidatorDependency, 1, 2)
out<< xmlOut.toString();RCP< ParameterList > readInList
RCP< ParameterEntry > readinDependee2
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
XMLParameterListWriter plWriter
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [5/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
basicConstruct_no_owns_mem  ,
 
)

Definition at line 345 of file RCPNodeHandle_UnitTests.cpp.

346 {
347  RCPNodeHandle nodeRef(basicRCPNodeHandle<T>(false));
348  TEST_EQUALITY_CONST( nodeRef.count(), 1 );
349  TEST_EQUALITY_CONST( nodeRef.has_ownership(), false );
350  nodeRef.has_ownership(true);
351  TEST_EQUALITY_CONST( nodeRef.has_ownership(), true );
352 }
Definition: gkregex.c:113
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [6/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
weakPtr_basic_1  ,
 
)

Definition at line 355 of file RCPNodeHandle_UnitTests.cpp.

356 {
357 
358  ECHO(RCPNodeHandle nodeRef1(basicRCPNodeHandle<T>(true)));
359  TEST_EQUALITY_CONST( nodeRef1.strength(), RCP_STRONG );
360 
361  ECHO(RCPNodeHandle nodeRef2 = nodeRef1.create_weak());
362 
363  TEST_EQUALITY_CONST( nodeRef2.strength(), RCP_WEAK );
364  TEST_EQUALITY_CONST( nodeRef1.strong_count(), 1 );
365  TEST_EQUALITY_CONST( nodeRef1.weak_count(), 1 );
366  TEST_EQUALITY_CONST( nodeRef2.strong_count(), 1 );
367  TEST_EQUALITY_CONST( nodeRef2.weak_count(), 1 );
368 
369  ECHO(RCPNodeHandle nodeRef3 = nodeRef2.create_strong());
370 
371  TEST_EQUALITY_CONST( nodeRef3.strength(), RCP_STRONG );
372  TEST_EQUALITY_CONST( nodeRef1.strong_count(), 2 );
373  TEST_EQUALITY_CONST( nodeRef1.weak_count(), 1 );
374  TEST_EQUALITY_CONST( nodeRef2.strong_count(), 2 );
375  TEST_EQUALITY_CONST( nodeRef2.weak_count(), 1 );
376 
377  MockRCP<T> mockRCP;
378  ECHO(nodeRef2.debug_assert_valid_ptr(mockRCP)); // Should not throw!
379 
380  // This will make the underlying object T get deleted!
381  ECHO(nodeRef1 = null);
382  ECHO(nodeRef3 = null);
383 
384  TEST_EQUALITY_CONST( nodeRef1.node_ptr()==0, true );
385  TEST_EQUALITY_CONST( nodeRef1.is_node_null(), true );
386  TEST_EQUALITY_CONST( nodeRef1.is_valid_ptr(), true );
387 
388  TEST_EQUALITY_CONST( nodeRef2.node_ptr()!=0, true );
389  TEST_EQUALITY_CONST( nodeRef2.is_node_null(), false );
390  TEST_EQUALITY_CONST( nodeRef2.is_valid_ptr(), false );
391 
392 #ifdef TEUCHOS_DEBUG
393  TEST_THROW( nodeRef2.debug_assert_valid_ptr(mockRCP),
394  DanglingReferenceError );
395 #endif
396 
397  ECHO(nodeRef2 = null); // Should make the underlying node go away
398 
399 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Definition: gkregex.c:113
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [7/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Teuchos_Validator  ,
NumberArrayValidatorConverterTest  ,
 
)

Definition at line 386 of file Validator_SerializationTest.cpp.

387 {
388  std::string arrayParameterName = "array";
389  ParameterList myList;
390 
391  const T arrayValidatorLen = as<T>(11);
392  RCP<ArrayNumberValidator< T > > arrayValidator =
393  rcp(new ArrayNumberValidator< T >(
394  rcp(new EnhancedNumberValidator<T>(as<T>(0), arrayValidatorLen))));
395  myList.set(arrayParameterName,
396  Array< T >(4, 10), "array parameter", arrayValidator);
397 
398  RCP<ParameterList> readInPL = writeThenReadPL(myList);
399 
400  RCP<const EnhancedNumberValidator< T > > readInPrototypeValidator =
401  rcp_dynamic_cast<const ArrayValidator<EnhancedNumberValidator<T>, T > >(
402  readInPL->getEntry(
403  arrayParameterName).validator(), true)->getPrototype();
404  RCP<const EnhancedNumberValidator< T > > actualPrototypeValidator =
405  arrayValidator->getPrototype();
406 
408  readInPrototypeValidator->getMin(),
409  actualPrototypeValidator->getMin()
410  );
412  readInPrototypeValidator->getMax(),
413  actualPrototypeValidator->getMax()
414  );
416  readInPrototypeValidator->getStep(),
417  actualPrototypeValidator->getStep()
418  );
420  readInPrototypeValidator->getPrecision(),
421  actualPrototypeValidator->getPrecision()
422  );
424  readInPrototypeValidator->hasMin(),
425  actualPrototypeValidator->hasMin()
426  );
428  readInPrototypeValidator->hasMax(),
429  actualPrototypeValidator->hasMax()
430  );
431 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [8/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
weakPtr_basic_2  ,
 
)

Definition at line 402 of file RCPNodeHandle_UnitTests.cpp.

403 {
404 
405  ECHO(RCPNodeHandle nodeRef1(basicRCPNodeHandle<T>(true)));
406  TEST_EQUALITY_CONST( nodeRef1.strength(), RCP_STRONG );
407 
408  ECHO(RCPNodeHandle nodeRef2 = nodeRef1.create_weak());
409  TEST_EQUALITY_CONST( nodeRef2.strength(), RCP_WEAK );
410  TEST_EQUALITY_CONST( nodeRef1.strong_count(), 1 );
411  TEST_EQUALITY_CONST( nodeRef1.weak_count(), 1 );
412  TEST_EQUALITY_CONST( nodeRef2.strong_count(), 1 );
413  TEST_EQUALITY_CONST( nodeRef2.weak_count(), 1 );
414 
415  MockRCP<T> mockRCP;
416 
417  ECHO(nodeRef2.debug_assert_valid_ptr(mockRCP)); // Should not throw!
418 
419  ECHO(nodeRef2 = null); // The underlying object stays alive!
420 
421  TEST_EQUALITY_CONST( nodeRef2.node_ptr()==0, true );
422  TEST_EQUALITY_CONST( nodeRef2.is_node_null(), true );
423  TEST_EQUALITY_CONST( nodeRef2.is_valid_ptr(), true );
424 
425  TEST_EQUALITY_CONST( nodeRef1.node_ptr()!=0, true );
426  TEST_EQUALITY_CONST( nodeRef1.is_node_null(), false );
427  TEST_EQUALITY_CONST( nodeRef1.is_valid_ptr(), true );
428 
429  nodeRef1.debug_assert_valid_ptr(mockRCP); // Should not throw!
430 
431 }
Definition: gkregex.c:113
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [9/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Teuchos_Validator  ,
TwoDArrayNumberValidatorConverterTest  ,
 
)

Definition at line 433 of file Validator_SerializationTest.cpp.

434 {
435  std::string arrayParameterName = "array";
436  ParameterList myList;
437 
438  const T arrayValidatorLen = as<T>(11);
439  RCP<TwoDArrayNumberValidator< T > > arrayValidator =
440  rcp(new TwoDArrayNumberValidator< T >(
441  rcp(new EnhancedNumberValidator<T>(as<T>(0), arrayValidatorLen))));
442  myList.set(arrayParameterName,
443  TwoDArray< T >(4,4, 10), "array parameter", arrayValidator);
444 
445  RCP<ParameterList> readInPL = writeThenReadPL(myList);
446 
447  RCP<const EnhancedNumberValidator< T > > readInPrototypeValidator =
448  rcp_dynamic_cast<const TwoDArrayValidator<EnhancedNumberValidator<T>, T > >(
449  readInPL->getEntry(
450  arrayParameterName).validator(), true)->getPrototype();
451  RCP<const EnhancedNumberValidator< T > > actualPrototypeValidator =
452  arrayValidator->getPrototype();
453 
455  readInPrototypeValidator->getMin(),
456  actualPrototypeValidator->getMin()
457  );
459  readInPrototypeValidator->getMax(),
460  actualPrototypeValidator->getMax()
461  );
463  readInPrototypeValidator->getStep(),
464  actualPrototypeValidator->getStep()
465  );
467  readInPrototypeValidator->getPrecision(),
468  actualPrototypeValidator->getPrecision()
469  );
471  readInPrototypeValidator->hasMin(),
472  actualPrototypeValidator->hasMin()
473  );
475  readInPrototypeValidator->hasMax(),
476  actualPrototypeValidator->hasMax()
477  );
478 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [10/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
debugWithNodeTracingPrint  ,
 
)

Definition at line 448 of file RCPNodeHandle_UnitTests.cpp.

449 {
450 
451  TEST_EQUALITY_CONST(RCPNodeTracer::isTracingActiveRCPNodes(), false);
452  RCPNodeTracer::setTracingActiveRCPNodes(true);
453  TEST_EQUALITY_CONST(RCPNodeTracer::isTracingActiveRCPNodes(), true);
454 
455  {
456 
457  T *p = new T; // Never do this in production code!
458  const std::string T_name = "T_name";
459  const std::string concreateT_name = "concreateT_name";
460  const bool has_ownership = true;
461  RCPNode *node = new RCPNodeTmpl<T,DeallocDelete<T> >(
462  p, DeallocDelete<T>(), has_ownership);
463 
464  RCPNodeHandle nodeRef(node, p, T_name, concreateT_name, has_ownership);
465 
466  TEST_EQUALITY_CONST(RCPNodeTracer::numActiveRCPNodes(), 1);
467 
468  out << "\nMake sure output is printed when there is an active node with tracing ...\n";
469 
470  const void* rcpNodeKey = RCPNodeTracer::getRCPNodeBaseObjMapKeyVoidPtr(p);
471 
472  std::ostringstream expendedOutput_oss;
473  expendedOutput_oss
474  << RCPNodeTracer::getActiveRCPNodeHeaderString()
475  << "\n"
476  << " 0: RCPNode (map_key_void_ptr=" << rcpNodeKey << ")\n"
477  << " Information = {T="<<T_name<<", ConcreteT="<<concreateT_name<<", p="<<p<<", has_ownership="<<has_ownership<<"}\n"
478  << " RCPNode address = " << node << "\n"
479  << " insertionNumber = " << node->insertion_number()
480  << "\n\n"
481  << RCPNodeTracer::getCommonDebugNotesString();
482 
483  std::ostringstream printActiveRCPNodes_out;
484  RCPNodeTracer::printActiveRCPNodes(printActiveRCPNodes_out);
485  TEST_EQUALITY( printActiveRCPNodes_out.str(), expendedOutput_oss.str() );
486 
487  // NOTE: The above test basically copied and pasted the ouptut stream code
488  // from printActiveRCPNodes(...) and will need to be maintained
489  // with this code. However, this is a good test because it ensures that
490  // the arguments node, p, T_name, and concreateT_name are passed, stored,
491  // and retrieved correctly. It is also a good test because it ensures
492  // that output is printed when node tracing is turned on.
493  //
494  // This is the very definition of a "white box" test but that is just fine
495  // for a unit test.
496 
497  }
498 
499  TEST_EQUALITY_CONST(RCPNodeTracer::numActiveRCPNodes(), 0);
500 
501  out << "\nMake sure no output is printed when there are no active nodes ...\n";
502  const std::string expendedOutput = "";
503  std::ostringstream printActiveRCPNodes_out;
504  RCPNodeTracer::printActiveRCPNodes(printActiveRCPNodes_out);
505  TEST_EQUALITY( printActiveRCPNodes_out.str(), expendedOutput );
506 
507  RCPNodeTracer::setTracingActiveRCPNodes(false);
508  TEST_EQUALITY_CONST(RCPNodeTracer::isTracingActiveRCPNodes(), false);
509 
510 }
mchunkptr p
Definition: g++malloc.c:1207
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [11/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Teuchos_Validator  ,
StringToIntegralConverterTest  ,
 
)

Definition at line 481 of file Validator_SerializationTest.cpp.

482 {
483  std::string defaultStringToIntegralParameterName = "defaultsti";
484  std::string stringToIntegralParameterName = "sti";
485  ParameterList myList;
486  RCP<StringToIntegralParameterEntryValidator< T > > defaultStiValidator = rcp(
487  new StringToIntegralParameterEntryValidator< T >(
488  tuple<std::string>("value1", "value2", "value3"), stringToIntegralParameterName));
489  RCP<StringToIntegralParameterEntryValidator< T > > stiValidator = rcp(
490  new StringToIntegralParameterEntryValidator< T >(
491  tuple<std::string>("value3", "value4", "value5"),
492  tuple<std::string>("the third value", "the fourth value", "the fifth value"),
493  tuple< T >(3,4,5),
494  stringToIntegralParameterName));
495  myList.set(defaultStringToIntegralParameterName,
496  "value1", "parameter with default sti validator", defaultStiValidator);
497  myList.set(stringToIntegralParameterName, "value3", "parameter with sti validator",
498  stiValidator);
499 
500  RCP<ParameterList> readInPL = writeThenReadPL(myList);
501 
502 
503  RCP<const StringToIntegralParameterEntryValidator< T > >
504  readInDefaultStiValidator =
505  rcp_dynamic_cast<const StringToIntegralParameterEntryValidator< T > >(
506  readInPL->getEntry(
507  defaultStringToIntegralParameterName).validator(), true);
508  RCP<const StringToIntegralParameterEntryValidator< T > >
509  readInStiValidator =
510  rcp_dynamic_cast<const StringToIntegralParameterEntryValidator< T > >(
511  readInPL->getEntry(
512  stringToIntegralParameterName).validator(), true);
513 
514  Array<std::string> readInDefaultValidStrings =
515  *(readInDefaultStiValidator->validStringValues());
516  Array<std::string> defaultValidStrings =
517  *(defaultStiValidator->validStringValues());
518  TEST_COMPARE_ARRAYS(readInDefaultValidStrings, defaultValidStrings);
519 
520  TEST_ASSERT(readInDefaultStiValidator->getStringDocs().is_null());
521  TEST_EQUALITY( readInDefaultStiValidator->getDefaultParameterName(),
522  defaultStiValidator->getDefaultParameterName());
523  for(int i=0; i<defaultValidStrings.size(); ++i){
524  TEST_EQUALITY(defaultStiValidator->getIntegralValue(defaultValidStrings[i]),
525  readInDefaultStiValidator->getIntegralValue(defaultValidStrings[i]));
526  }
527 
528  Array<std::string> readInValidStrings = *(readInStiValidator->validStringValues());
529  Array<std::string> validStrings = *(stiValidator->validStringValues());
530  TEST_COMPARE_ARRAYS(readInValidStrings, validStrings);
531 
532  TEST_COMPARE_ARRAYS(*(readInStiValidator->getStringDocs()),
533  *(stiValidator->getStringDocs()));
534  TEST_EQUALITY( readInStiValidator->getDefaultParameterName(),
535  stiValidator->getDefaultParameterName());
536  for(int i=0; i<validStrings.size(); ++i){
537  TEST_EQUALITY(stiValidator->getIntegralValue(validStrings[i]),
538  readInStiValidator->getIntegralValue(validStrings[i]));
539  }
540 
541 }
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
TEST_ASSERT(nonnull(readInCon))
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
int i
Definition: parse.c:193
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [12/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
debugWithoutNodeTracingPrint  ,
 
)

Definition at line 513 of file RCPNodeHandle_UnitTests.cpp.

514 {
515 
516  TEST_EQUALITY_CONST(RCPNodeTracer::isTracingActiveRCPNodes(), false);
517  RCPNodeTracer::setTracingActiveRCPNodes(false);
518  TEST_EQUALITY_CONST(RCPNodeTracer::isTracingActiveRCPNodes(), false);
519 
520  T *p = new T; // Never do this in production code!
521  const std::string T_name = "T_name";
522  const std::string concreateT_name = "concreateT_name";
523  const bool has_ownership = true;
524  RCPNode *node = new RCPNodeTmpl<T,DeallocDelete<T> >(
525  p, DeallocDelete<T>(), has_ownership);
526 
527  RCPNodeHandle nodeRef(node, p, T_name, concreateT_name, has_ownership);
528 
529  TEST_EQUALITY_CONST(RCPNodeTracer::numActiveRCPNodes(), 0);
530 
531  out << "\nMake sure no output is printed when there are no active nodes without tracing ...\n";
532  const std::string expendedOutput = "";
533  std::ostringstream printActiveRCPNodes_out;
534  RCPNodeTracer::printActiveRCPNodes(printActiveRCPNodes_out);
535  TEST_EQUALITY( printActiveRCPNodes_out.str(), expendedOutput );
536 
537 }
mchunkptr p
Definition: g++malloc.c:1207
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [13/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
copyConstruct  ,
 
)

Definition at line 543 of file RCPNodeHandle_UnitTests.cpp.

544 {
545  RCPNodeHandle nodeRef1(basicRCPNodeHandle<T>(true));
546  RCPNodeHandle nodeRef2(nodeRef1);
547  TEST_EQUALITY_CONST( nodeRef1.count(), 2 );
548  TEST_EQUALITY_CONST( nodeRef2.count(), 2 );
549  TEST_EQUALITY_CONST( nodeRef1.has_ownership(), true );
550  TEST_EQUALITY_CONST( nodeRef2.has_ownership(), true );
551 }
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [14/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
assignmentOperator  ,
 
)

Definition at line 554 of file RCPNodeHandle_UnitTests.cpp.

555 {
556  RCPNodeHandle nodeRef1(basicRCPNodeHandle<T>(true));
557  RCPNodeHandle nodeRef2;
558  nodeRef2 = nodeRef1;
559  TEST_EQUALITY_CONST( nodeRef1.count(), 2 );
560  TEST_EQUALITY_CONST( nodeRef2.count(), 2 );
561  TEST_EQUALITY_CONST( nodeRef1.has_ownership(), true );
562  TEST_EQUALITY_CONST( nodeRef2.has_ownership(), true );
563 }
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [15/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
extraData_basic  ,
 
)

Definition at line 566 of file RCPNodeHandle_UnitTests.cpp.

567 {
568 
569  RCPNodeHandle nodeRef(basicRCPNodeHandle<T>(true));
570 
571  const int v1 = 2;
572  const any a1(v1);
573  nodeRef.set_extra_data(a1, "a1", PRE_DESTROY, true);
574 
575  any &a2 = nodeRef.get_extra_data(a1.typeName(), "a1");
576  TEST_EQUALITY_CONST( a1.same(a2), true );
577  TEST_EQUALITY( any_cast<int>(a2), v1 );
578 
579  any *a3 = nodeRef.get_optional_extra_data(a1.typeName(), "a1");
580  TEST_EQUALITY_CONST( a3!=0, true );
581  TEST_EQUALITY( &a2, a3 );
582  TEST_EQUALITY_CONST( a3->same(a1), true );
583 
584  RCPNodeHandle nodeRef2 = nodeRef;
585 
586  const int v2 = 3;
587  a2 = v2;
588  TEST_EQUALITY( any_cast<int>(a1), v1 );
589  TEST_EQUALITY( any_cast<int>(*a3), v2 );
590 
591  any &a4 = nodeRef2.get_extra_data(a1.typeName(), "a1");
592  TEST_EQUALITY( &a4, &a2 );
593  TEST_EQUALITY( &a4, a3 );
594  TEST_EQUALITY( any_cast<int>(a4), v2 );
595 
596 }
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [16/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
extraData_basic_const  ,
 
)

Definition at line 599 of file RCPNodeHandle_UnitTests.cpp.

600 {
601 
602  RCPNodeHandle nodeRef(basicRCPNodeHandle<T>(true));
603 
604  const int v1 = 2;
605  const any a1(v1);
606  nodeRef.set_extra_data(a1, "a1", PRE_DESTROY, true);
607 
608  const RCPNodeHandle nodeRef2 = nodeRef;
609 
610  const any &a2 = nodeRef2.get_extra_data(a1.typeName(), "a1");
611  TEST_EQUALITY_CONST( a1.same(a2), true );
612  TEST_EQUALITY( any_cast<int>(a2), v1 );
613 
614  const any *a3 = nodeRef2.get_optional_extra_data(a1.typeName(), "a1");
615  TEST_EQUALITY_CONST( a3!=0, true );
616  TEST_EQUALITY( &a2, a3 );
617  TEST_EQUALITY_CONST( a3->same(a1), true );
618 
619 }
TEST_EQUALITY(readInDep1.get(), readInDep1.get())
Definition: gkregex.c:113
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [17/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
extraData_failed  ,
 
)

Definition at line 622 of file RCPNodeHandle_UnitTests.cpp.

623 {
624 
625  RCPNodeHandle nodeRef(basicRCPNodeHandle<T>(true));
626 
627  const int v1 = 2;
628  const any a1(v1);
629  nodeRef.set_extra_data(a1, "a1", PRE_DESTROY, true);
630 
631 #ifdef TEUCHOS_DEBUG
632 
633  TEST_THROW({nodeRef.get_extra_data("wrong type", "a1");},
634  std::invalid_argument);
635 
636  TEST_THROW({nodeRef.get_extra_data(a1.typeName(), "wrong name");},
637  std::invalid_argument);
638 
639 #endif // TEUCHOS_DEBUG
640 
641  any *a2 = nodeRef.get_optional_extra_data("wrong type", "a1");
642  TEST_EQUALITY_CONST( a2, 0 );
643 
644  any *a3 = nodeRef.get_optional_extra_data(a1.typeName(), "wrong name");
645  TEST_EQUALITY_CONST( a3, 0 );
646 
647 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [18/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( RCPNodeHandle  ,
extraData_failed_const  ,
 
)

Definition at line 650 of file RCPNodeHandle_UnitTests.cpp.

651 {
652 
653  RCPNodeHandle nodeRef(basicRCPNodeHandle<T>(true));
654 
655  const int v1 = 2;
656  const any a1(v1);
657  nodeRef.set_extra_data(a1, "a1", PRE_DESTROY, true);
658 
659  const RCPNodeHandle nodeRef2 = nodeRef;
660 
661 #ifdef TEUCHOS_DEBUG
662 
663  TEST_THROW({nodeRef2.get_extra_data("wrong type", "a1");},
664  std::invalid_argument);
665 
666  TEST_THROW({nodeRef2.get_extra_data(a1.typeName(), "wrong name");},
667  std::invalid_argument);
668 
669 #endif // TEUCHOS_DEBUG
670 
671  const any *a2 = nodeRef2.get_optional_extra_data("wrong type", "a1");
672  TEST_EQUALITY_CONST( a2, 0 );
673 
674  const any *a3 = nodeRef2.get_optional_extra_data(a1.typeName(), "wrong name");
675  TEST_EQUALITY_CONST( a3, 0 );
676 
677 }
TEST_THROW(RCP< ParameterList > missingDependeeList=getParametersFromXmlFile("MissingDependeeTag.xml", depSheet), MissingDependeesException)
Here is the call graph for this function:

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [19/19]

Teuchos::TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Teuchos_Dependencies  ,
RangeValidatorDepSerialization  ,
 
)

Definition at line 915 of file Dependencies_SerializationTests.cpp.

917 {
918  std::string dependee1 = "dependee param";
919  std::string dependee2 = "dependee param2";
920  std::string dependent1 = "dependent param1";
921  std::string dependent2 = "dependent param2";
922  ParameterList myDepList("Range Vali Dep List");
923  RCP<DependencySheet> myDepSheet = rcp(new DependencySheet);
924  myDepList.set(dependee1, ScalarTraits<T>::one());
925  myDepList.set(dependee2, ScalarTraits<T>::one());
926  myDepList.set(dependent1, 2.0);
927  myDepList.set(dependent2, 3.0);
928 
929  RCP<EnhancedNumberValidator<double> > double1Vali =
930  rcp(new EnhancedNumberValidator<double>(0,10));
931 
932  RCP<EnhancedNumberValidator<double> > double2Vali =
933  rcp(new EnhancedNumberValidator<double>(0,30));
934 
935  RCP<EnhancedNumberValidator<double> > defaultValidator =
936  rcp(new EnhancedNumberValidator<double>(0,50));
937 
938  typename RangeValidatorDependency<T>::Range range1(0,10);
939  typename RangeValidatorDependency<T>::Range range2(11,50);
940 
941  typename RangeValidatorDependency<T>::RangeToValidatorMap rangeValiMap;
942  rangeValiMap[range1] = double1Vali;
943  rangeValiMap[range2] = double2Vali;
944 
945  RCP<RangeValidatorDependency<T> > simpleRangeValiDep = rcp(
946  new RangeValidatorDependency<T> (
947  myDepList.getEntryRCP(dependee1),
948  myDepList.getEntryRCP(dependent1),
949  rangeValiMap));
950 
951  Dependency::ParameterEntryList dependentList;
952  dependentList.insert(myDepList.getEntryRCP(dependent1));
953  dependentList.insert(myDepList.getEntryRCP(dependent2));
954 
955  RCP<RangeValidatorDependency<T> > complexRangeValiDep = rcp(
956  new RangeValidatorDependency<T> (
957  myDepList.getEntryRCP(dependee2),
959  rangeValiMap,
960  defaultValidator));
961 
962  myDepSheet->addDependency(simpleRangeValiDep);
963  myDepSheet->addDependency(complexRangeValiDep);
964 
965  RCP<DependencySheet> readInDepSheet = rcp(new DependencySheet);
966 
967  XMLParameterListWriter plWriter;
968  XMLObject xmlOut = plWriter.toXML(myDepList, myDepSheet);
969  out << xmlOut.toString();
970 
971  RCP<ParameterList> readInList =
972  writeThenReadPL(myDepList, myDepSheet, readInDepSheet);
973 
974  RCP<ParameterEntry> readinDependee1 = readInList->getEntryRCP(dependee1);
975  RCP<ParameterEntry> readinDependent1 = readInList->getEntryRCP(dependent1);
976  RCP<ParameterEntry> readinDependee2 = readInList->getEntryRCP(dependee2);
977  RCP<ParameterEntry> readinDependent2 = readInList->getEntryRCP(dependent2);
978 
979  RCP<Dependency> readinDep1 =
980  *(readInDepSheet->getDependenciesForParameter(readinDependee1)->begin());
981 
982  RCP<Dependency> readinDep2 =
983  *(readInDepSheet->getDependenciesForParameter(readinDependee2)->begin());
984 
985  BASIC_DEPENDENCY_TEST(readinDep1, RangeValidatorDependency<T>, 1, 1);
986  VERIFY_DEPENDEE(readinDep1, readinDependee1);
987  VERIFY_DEPENDENT(readinDep1, readinDependent1);
988 
989  BASIC_DEPENDENCY_TEST(readinDep2, RangeValidatorDependency<T>, 1, 2);
990  VERIFY_DEPENDEE(readinDep2, readinDependee2);
991  VERIFY_DEPENDENT(readinDep2, readinDependent1);
992  VERIFY_DEPENDENT(readinDep2, readinDependent2);
993 
994 
995  RCP<RangeValidatorDependency<T> > castedDep1 =
996  rcp_dynamic_cast<RangeValidatorDependency<T> >(readinDep1, true);
997  RCP<RangeValidatorDependency<T> > castedDep2 =
998  rcp_dynamic_cast<RangeValidatorDependency<T> >(readinDep2, true);
999 
1000  typename RangeValidatorDependency<T>::RangeToValidatorMap readinMap1 =
1001  castedDep1->getRangeToValidatorMap();
1002  TEST_EQUALITY(readinMap1.size(), 2);
1003  typename RangeValidatorDependency<T>::RangeToValidatorMap::const_iterator it =
1004  readinMap1.begin();
1005  TEST_EQUALITY(it->first.first, 0);
1006  TEST_EQUALITY(it->first.second, 10);
1007  it++;
1008  TEST_EQUALITY(it->first.first, 11);
1009  TEST_EQUALITY(it->first.second, 50);
1010 
1011 
1012  RCP<const ParameterEntryValidator> range1Vali =
1013  readinMap1.find(range1)->second;
1014  RCP<const ParameterEntryValidator> range2Vali =
1015  readinMap1.find(range2)->second;
1016  TEST_EQUALITY(
1017  rcp_dynamic_cast<const EnhancedNumberValidator<double> >(
1018  range1Vali, true)->getMax(),
1019  double1Vali->getMax());
1020  TEST_EQUALITY(
1021  rcp_dynamic_cast<const EnhancedNumberValidator<double> >(
1022  range2Vali, true)->getMax(),
1023  double2Vali->getMax());
1024 
1025  typename RangeValidatorDependency<T>::RangeToValidatorMap readinMap2 =
1026  castedDep2->getRangeToValidatorMap();
1027  it = readinMap2.begin();
1028  TEST_EQUALITY(it->first.first, 0);
1029  TEST_EQUALITY(it->first.second, 10);
1030  it++;
1031  TEST_EQUALITY(it->first.first, 11);
1032  TEST_EQUALITY(it->first.second, 50);
1033 
1034  TEST_EQUALITY(
1035  rcp_dynamic_cast<const EnhancedNumberValidator<double> >(
1036  readinMap2.find(range1)->second, true)->getMax(),
1037  double1Vali->getMax());
1038  TEST_EQUALITY(
1039  rcp_dynamic_cast<const EnhancedNumberValidator<double> >(
1040  readinMap2.find(range2)->second, true)->getMax(),
1041  double2Vali->getMax());
1042 
1043  RCP<const EnhancedNumberValidator<double> > defaultReadInVali =
1044  rcp_dynamic_cast<const EnhancedNumberValidator<double> >(
1045  castedDep2->getDefaultValidator());
1046  TEST_EQUALITY( defaultReadInVali->getMax(), defaultValidator->getMax());
1047  TEST_EQUALITY( defaultReadInVali->getMin(), defaultValidator->getMin());
1048 }
Dependency::ParameterEntryList dependentList
RCP< ParameterEntry > readinDependent2
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
TEST_EQUALITY(rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep2->getDefaultValidator(), true) ->getMax(), defaultVali->getMax())
RCP< ParameterEntry > readinDependee1
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Set a parameter whose value has type T.
RCP< ParameterEntry > readinDependent1
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
real(double), parameter one
Definition: Parameters.f90:27
VERIFY_DEPENDEE(readinDep2, readinDependee3)
RCP< ConditionVisualDependency > castedDep2
RCP< DependencySheet > myDepSheet
VERIFY_DEPENDENT(readinDep2, readinDependent1)
RCP< ConditionVisualDependency > castedDep1
RCP< Dependency > readinDep1
RCP< DependencySheet > readInDepSheet
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
RCP< EnhancedNumberValidator< double > > double1Vali
ParameterList myDepList("String Vali Dep List")
RCP< Dependency > readinDep2
RCP< EnhancedNumberValidator< double > > double2Vali
BASIC_DEPENDENCY_TEST(readinDep2, StringValidatorDependency, 1, 2)
out<< xmlOut.toString();RCP< ParameterList > readInList
RCP< ParameterEntry > readinDependee2
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.
XMLParameterListWriter plWriter
Here is the call graph for this function:

◆ Teuchos_Version()

std::string Teuchos::Teuchos_Version ( )

Definition at line 54 of file Teuchos_Version.hpp.

54  {
55 #ifdef TEUCHOS_STANDALONE_PACKAGE
56  return ("Teuchos standalone package " TEUCHOS_VERSION_STRING);
57 #else
58  return ("Teuchos in Trilinos " TRILINOS_VERSION_STRING);
59 #endif
60  }
Here is the caller graph for this function:

◆ throwScalarTraitsNanInfError()

void Teuchos::throwScalarTraitsNanInfError ( const std::string &  errMsg)

Definition at line 99 of file Teuchos_ScalarTraits.cpp.

100 {
101 #ifdef TEUCHOS_SCALAR_TRAITS_THROW_NAN_INF_ERR
102  TEUCHOS_TEST_FOR_EXCEPTION( true, std::runtime_error, errMsg );
103 #endif
104 }
Here is the call graph for this function:

◆ toString() [1/4]

const char* Teuchos::toString ( const EReductionType  reductType)

Definition at line 69 of file Teuchos_EReductionType.cpp.

70 {
71  switch (reductType) {
72  case REDUCE_SUM: return "REDUCE_SUM";
73  case REDUCE_MIN: return "REDUCE_MIN";
74  case REDUCE_MAX: return "REDUCE_MAX";
75  case REDUCE_AND: return "REDUCE_AND";
76  case REDUCE_BOR: return "REDUCE_BOR";
77  default:
78  TEUCHOS_TEST_FOR_EXCEPTION
79  (true, std::invalid_argument, "Teuchos::toString(EReductionType): "
80  "Invalid EReductionType value " << reductType << ". Valid values "
81  "are REDUCE_SUM = " << REDUCE_SUM << ", REDUCE_MIN = " << REDUCE_MIN
82  << ", REDUCE_MAX = " << REDUCE_MIN << ", REDUCE_AND = " << REDUCE_AND
83  << ", and REDUCE_BOR = " << REDUCE_BOR
84  << ".");
85  }
86 }
Here is the caller graph for this function:

◆ toString() [2/4]

template<typename T >
std::string Teuchos::toString ( const T &  t)
inline

Utility function for returning a pretty string representation of a object of type T.

NOTE: This helper function simply returns ToStringTraits<T>::toString(t) and the right way to speicalize the behavior is to specialize ToStringTraits.

Definition at line 82 of file Teuchos_toString.hpp.

83 {
85 }
std::string toString(const T &t)
Utility function for returning a pretty string representation of a object of type T...

◆ toString() [3/4]

template<class Key >
std::string Teuchos::toString ( const HashSet< Key > &  h)
inline

Definition at line 112 of file Teuchos_HashSet.hpp.

112 {return h.toString();}
Here is the call graph for this function:

◆ toString() [4/4]

template<class Key , class Value >
std::string Teuchos::toString ( const Hashtable< Key, Value > &  h)
inline

Definition at line 263 of file Teuchos_Hashtable.hpp.

264  {
265  Array<Key> keys;
266  Array<Value> values;
267  h.arrayify(keys, values);
268 
269  std::string rtn = "[";
270  for (int i=0; i<keys.length(); i++)
271  {
272  rtn += "{" + Teuchos::toString(keys[i]) + ", " + Teuchos::toString(values[i])
273  + "}";
274  if (i < keys.length()-1) rtn += ", ";
275  }
276  rtn += "]";
277 
278  return rtn;
279  }
const char * toString(const EReductionType reductType)
int i
Definition: parse.c:193
REAL * values
Definition: lp_lib.h:930
Here is the call graph for this function:

◆ TWODCOL_TEST_GROUP()

Teuchos::TWODCOL_TEST_GROUP ( int  )

◆ TWODROW_TEST_GROUP()

Teuchos::TWODROW_TEST_GROUP ( int  )

◆ typeName()

template<typename T >
std::string Teuchos::typeName ( const T &  t)

Template function for returning the concrete type name of a passed-in object.

Uses the traits class TypeNameTraits so the behavior of this function can be specialized in every possible way. The default return value is typically derived from typeid(t).name().

Definition at line 113 of file Teuchos_TypeNameTraits.hpp.

114 {
115  typedef typename ConstTypeTraits<T>::NonConstType ncT;
116 #ifndef TEUCHOS_TYPE_NAME_TRAITS_OLD_IBM
117  return TypeNameTraits<ncT>::concreteName(t);
118 #else
119  // You can't pass general objects to AIX by value as above. This means that
120  // you will not get the concrete name printed on AIX but that is life on
121  // such compilers.
122  return TypeNameTraits<ncT>::name();
123 #endif
124 }
char * name
Definition: lp_lib.h:823
Here is the caller graph for this function:

◆ updateParametersFromYamlCString()

void Teuchos::updateParametersFromYamlCString ( const char *const  data,
const Teuchos::Ptr< Teuchos::ParameterList > &  paramList,
bool  overwrite 
)

Definition at line 78 of file Teuchos_YamlParser.cpp.

81 {
83  if(overwrite)
84  {
85  paramList->setParameters(*updated);
86  }
87  else
88  {
89  paramList->setParametersNotAlreadySet(*updated);
90  }
91 }
ParameterList & setParameters(const ParameterList &source)
Teuchos::RCP< Teuchos::ParameterList > parseYamlText(const char *text)
ParameterList & setParametersNotAlreadySet(const ParameterList &source)
Here is the call graph for this function:

◆ updateParametersFromYamlFile()

void Teuchos::updateParametersFromYamlFile ( const std::string &  yamlFileName,
const Teuchos::Ptr< Teuchos::ParameterList > &  paramList 
)
related

Definition at line 69 of file Teuchos_YamlParser.cpp.

71 {
72  //load the YAML file in as a new param list
74  //now update the original list (overwriting values with same key)
75  paramList->setParameters(*updated);
76 }
ParameterList & setParameters(const ParameterList &source)
Teuchos::RCP< Teuchos::ParameterList > parseYamlFile(const std::string &yamlFile)
Here is the call graph for this function:

◆ updateParametersFromYamlString()

void Teuchos::updateParametersFromYamlString ( const std::string &  yamlData,
const Teuchos::Ptr< Teuchos::ParameterList > &  paramList,
bool  overwrite 
)
related

Definition at line 93 of file Teuchos_YamlParser.cpp.

96 {
98  if(overwrite)
99  {
100  paramList->setParameters(*updated);
101  }
102  else
103  {
104  paramList->setParametersNotAlreadySet(*updated);
105  }
106 }
ParameterList & setParameters(const ParameterList &source)
Teuchos::RCP< Teuchos::ParameterList > parseYamlText(const char *text)
ParameterList & setParametersNotAlreadySet(const ParameterList &source)
Here is the call graph for this function:

◆ updateSuccess()

void Teuchos::updateSuccess ( const bool  result,
bool success 
)
inline

Update the success bool flag.

Definition at line 551 of file Teuchos_TestingHelpers.hpp.

552 {
553  if (!result) success = false;
554 }

◆ VERIFY_DEPENDEE() [1/3]

Teuchos::VERIFY_DEPENDEE ( readinDep1  ,
readinDependee1   
)
Here is the caller graph for this function:

◆ VERIFY_DEPENDEE() [2/3]

Teuchos::VERIFY_DEPENDEE ( readinDep2  ,
readinDependee2   
)

◆ VERIFY_DEPENDEE() [3/3]

Teuchos::VERIFY_DEPENDEE ( readinDep2  ,
readinDependee3   
)

◆ VERIFY_DEPENDENT() [1/4]

Teuchos::VERIFY_DEPENDENT ( readinDep1  ,
readinDependent1   
)
Here is the caller graph for this function:

◆ VERIFY_DEPENDENT() [2/4]

Teuchos::VERIFY_DEPENDENT ( readinDep2  ,
readinDependent2   
)

◆ VERIFY_DEPENDENT() [3/4]

Teuchos::VERIFY_DEPENDENT ( readinDep2  ,
readinDependent3   
)

◆ VERIFY_DEPENDENT() [4/4]

Teuchos::VERIFY_DEPENDENT ( readinDep2  ,
readinDependent1   
)

◆ writeThenReadPL() [1/2]

Teuchos::RCP< Teuchos::ParameterList > Teuchos::writeThenReadPL ( ParameterList myList)

Write a parameter list to xml and then read that xml back in via a string. The intent of this function is to be used for testing purposes.

Parameters
paramList[in] Contains the parameters and sublists that will be written out and then read back in.
Returns
The read in parameter list.

Definition at line 48 of file Teuchos_XMLParameterListTestHelpers.cpp.

49 {
50  std::ostringstream xmlOut;
51  writeParameterListToXmlOStream(myList, xmlOut);
52  return getParametersFromXmlString(xmlOut.str());
53 }
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void writeParameterListToXmlOStream(const ParameterList &paramList, std::ostream &xmlOut, RCP< const DependencySheet > depSheet=null)
Write parameters and sublists in XML format to an std::ostream.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > getParametersFromXmlString(const std::string &xmlStr)
Reads XML parameters from a std::string and return them in a new parameter list.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeThenReadPL() [2/2]

Teuchos::RCP< Teuchos::ParameterList > Teuchos::writeThenReadPL ( ParameterList myList,
RCP< DependencySheet depSheetIn,
RCP< DependencySheet depSheetOut 
)

Write a parameter list to xml and then read that xml back in via a string. The intent of this function is to be used for testing purposes.

Parameters
paramList[in] Contains the parameters and sublists that will be written out and then read back in.
depSheetIn[in] The Dependency Sheet from which Dependencies should be should be written.
depSheetOut[out] The Dependency Sheet into which Dependencies should be placed once read.
Returns
The read in parameter list.

Definition at line 57 of file Teuchos_XMLParameterListTestHelpers.cpp.

61 {
62  std::ostringstream xmlOut;
64  return getParametersFromXmlString(xmlOut.str(), depSheetOut);
65 }
RCP< DependencySheet > depSheetIn
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void writeParameterListToXmlOStream(const ParameterList &paramList, std::ostream &xmlOut, RCP< const DependencySheet > depSheet=null)
Write parameters and sublists in XML format to an std::ostream.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > getParametersFromXmlString(const std::string &xmlStr)
Reads XML parameters from a std::string and return them in a new parameter list.
Here is the call graph for this function:

◆ XMLObject::addAttribute< const std::string & >() [1/2]

template<>
void Teuchos::XMLObject::addAttribute< const std::string &> ( const std::string &  name,
const std::string &  value 
)

Definition at line 155 of file Teuchos_XMLObject.cpp.

157 {
158  TEUCHOS_TEST_FOR_EXCEPTION(is_null(ptr_), Teuchos::EmptyXMLError,
159  "XMLObject::addAttribute: XMLObject is empty");
160  ptr_->addAttribute(name, value);
161 }
Thrown when attempting to parse an empty XML std::string.
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
char * name
Definition: lp_lib.h:823
REAL value
Definition: lp_lib.h:932
Here is the call graph for this function:

◆ XMLObject::addAttribute< const std::string & >() [2/2]

template<>
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void Teuchos::XMLObject::addAttribute< const std::string &> ( const std::string &  name,
const std::string &  value 
)

Definition at line 155 of file Teuchos_XMLObject.cpp.

157 {
158  TEUCHOS_TEST_FOR_EXCEPTION(is_null(ptr_), Teuchos::EmptyXMLError,
159  "XMLObject::addAttribute: XMLObject is empty");
160  ptr_->addAttribute(name, value);
161 }
Thrown when attempting to parse an empty XML std::string.
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
char * name
Definition: lp_lib.h:823
REAL value
Definition: lp_lib.h:932
Here is the call graph for this function:

◆ XMLObject::getRequired< std::string >() [1/2]

template<>
std::string Teuchos::XMLObject::getRequired< std::string > ( const std::string &  name) const

Definition at line 124 of file Teuchos_XMLObject.cpp.

125 {
126  return getRequired(name);
127 }
char * name
Definition: lp_lib.h:823
Here is the call graph for this function:

◆ XMLObject::getRequired< std::string >() [2/2]

template<>
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT std::string Teuchos::XMLObject::getRequired< std::string > ( const std::string &  name) const

Definition at line 124 of file Teuchos_XMLObject.cpp.

125 {
126  return getRequired(name);
127 }
char * name
Definition: lp_lib.h:823
Here is the call graph for this function:

Variable Documentation

◆ andCon

RCP<AndCondition> Teuchos::andCon = rcp(new AndCondition(conList))

Definition at line 456 of file Dependencies_SerializationTests.cpp.

◆ basicStringValiDep

RCP<StringValidatorDependency> Teuchos::basicStringValiDep
Initial value:
= rcp(
new StringValidatorDependency(
myDepList.getEntryRCP(dependee1),
StringValidatorDependency::ValueToValidatorMap valuesAndValidators
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
ParameterList myDepList("String Vali Dep List")

Definition at line 733 of file Dependencies_SerializationTests.cpp.

◆ binCon

RCP< BinCondition > Teuchos::binCon = rcp(new BinCondition (conList))

Definition at line 295 of file Condition_Serialization_UnitTests.cpp.

◆ binConDep

RCP<ConditionVisualDependency> Teuchos::binConDep
Initial value:
=
rcp(new ConditionVisualDependency(
ParameterList testList("Condition Test List")
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
RCP< BinCondition > binCon

Definition at line 297 of file Condition_Serialization_UnitTests.cpp.

◆ BinCondition

Teuchos::BinCondition
Initial value:
{
ConditionXMLConverterDB::printKnownConverters(out)

Definition at line 275 of file Condition_Serialization_UnitTests.cpp.

◆ boolCon

RCP<BoolCondition> Teuchos::boolCon
Initial value:
=
rcp(new BoolCondition(myDepList.getEntryRCP(dependee2)))
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
ParameterList myDepList("String Vali Dep List")

Definition at line 447 of file Dependencies_SerializationTests.cpp.

◆ boolCon1

RCP< BoolCondition > Teuchos::boolCon1
Initial value:
=
rcp(new BoolCondition(testList.getEntryRCP(paramName1)))
ParameterList testList("Condition Test List")
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...

Definition at line 287 of file Condition_Serialization_UnitTests.cpp.

◆ boolCon2

RCP<BoolCondition> Teuchos::boolCon2
Initial value:
=
rcp(new BoolCondition(testList.getEntryRCP(paramName1)))
ParameterList testList("Condition Test List")
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...

Definition at line 289 of file Condition_Serialization_UnitTests.cpp.

◆ BoolLogicConditionSerialization

Teuchos::BoolLogicConditionSerialization

Definition at line 275 of file Condition_Serialization_UnitTests.cpp.

◆ boolVisConverter

BoolVisualDependencyXMLConverter Teuchos::boolVisConverter

Definition at line 1088 of file Dependencies_SerializationTests.cpp.

◆ boolVisDep

RCP<BoolVisualDependency> Teuchos::boolVisDep
Initial value:
=
rcp(new BoolVisualDependency(dependeeParam, dependentParam))
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
RCP< ParameterEntry > dependentParam
RCP< ParameterEntry > dependeeParam

Definition at line 1082 of file Dependencies_SerializationTests.cpp.

◆ castedDep1

RCP< StringValidatorDependency > Teuchos::castedDep1
Initial value:
=
rcp_dynamic_cast<ConditionVisualDependency>(readinDep1, true)
RCP< Dependency > readinDep1
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.

Definition at line 513 of file Dependencies_SerializationTests.cpp.

◆ castedDep2

RCP< StringValidatorDependency > Teuchos::castedDep2
Initial value:
=
rcp_dynamic_cast<ConditionVisualDependency>(readinDep2, true)
RCP< Dependency > readinDep2
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.

Definition at line 515 of file Dependencies_SerializationTests.cpp.

◆ complexConVisDep

RCP<ConditionVisualDependency> Teuchos::complexConVisDep
Initial value:
= rcp(
new ConditionVisualDependency(
false))
RCP< AndCondition > andCon
Dependency::ParameterEntryList dependentList
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...

Definition at line 467 of file Dependencies_SerializationTests.cpp.

◆ complexStringValiDep

RCP<StringValidatorDependency> Teuchos::complexStringValiDep
Initial value:
= rcp(
new StringValidatorDependency(
StringValidatorDependency::ValueToValidatorMap valuesAndValidators
Dependency::ParameterEntryList dependentList
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
RCP< EnhancedNumberValidator< double > > defaultVali
ParameterList myDepList("String Vali Dep List")

Definition at line 743 of file Dependencies_SerializationTests.cpp.

◆ conditionVal1

StringCondition::ValueList Teuchos::conditionVal1
Initial value:
=
tuple<std::string>("steve", "blah", "your face")

Definition at line 441 of file Dependencies_SerializationTests.cpp.

◆ ConditionVisualDepSerialization

Teuchos::ConditionVisualDepSerialization
Initial value:
{
std::string dependee1 = "string param"

Definition at line 425 of file Dependencies_SerializationTests.cpp.

◆ conList

Initial value:
=
tuple<RCP<const Condition> >(boolCon1, boolCon2)
RCP< BoolCondition > boolCon1
RCP< BoolCondition > boolCon2

Definition at line 292 of file Condition_Serialization_UnitTests.cpp.

◆ dbl_nan

TEUCHOSCORE_LIB_DLL_EXPORT const double Teuchos::dbl_nan = +returnDoubleZero()/returnDoubleZero()

Definition at line 123 of file Teuchos_ScalarTraits.cpp.

◆ defaultVali

RCP<EnhancedNumberValidator<double> > Teuchos::defaultVali
Initial value:
=
rcp(new EnhancedNumberValidator<double>(4,90))
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...

Definition at line 726 of file Dependencies_SerializationTests.cpp.

◆ dependee2

std::string Teuchos::dependee2 = "bool param"

Definition at line 427 of file Dependencies_SerializationTests.cpp.

◆ dependee3

std::string Teuchos::dependee3 = "int param"

Definition at line 428 of file Dependencies_SerializationTests.cpp.

◆ dependeeParam

RCP<ParameterEntry> Teuchos::dependeeParam = rcp(new ParameterEntry(true))

Definition at line 1080 of file Dependencies_SerializationTests.cpp.

◆ DependencySerializationExceptions

Teuchos::DependencySerializationExceptions
Initial value:
{
RCP<DependencySheet> depSheet = rcp(new DependencySheet)
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...

Definition at line 1063 of file Dependencies_SerializationTests.cpp.

◆ dependent1

std::string Teuchos::dependent1 = "dependent param1"

Definition at line 429 of file Dependencies_SerializationTests.cpp.

◆ dependent1Name

std::string Teuchos::dependent1Name = "dependent1"

Definition at line 279 of file Condition_Serialization_UnitTests.cpp.

◆ dependent2

std::string Teuchos::dependent2 = "dependent param2"

Definition at line 430 of file Dependencies_SerializationTests.cpp.

◆ dependent3

std::string Teuchos::dependent3 = "dependent param3"

Definition at line 431 of file Dependencies_SerializationTests.cpp.

◆ dependentList

Dependency::ParameterEntryList Teuchos::dependentList

Definition at line 463 of file Dependencies_SerializationTests.cpp.

◆ dependentParam

RCP<ParameterEntry> Teuchos::dependentParam = rcp(new ParameterEntry("blah"))

Definition at line 1081 of file Dependencies_SerializationTests.cpp.

◆ dependentValue

std::string Teuchos::dependentValue = "hi there!"

Definition at line 282 of file Condition_Serialization_UnitTests.cpp.

◆ depSheet1

RCP< DependencySheet > Teuchos::depSheet1 = rcp(new DependencySheet)

Definition at line 302 of file Condition_Serialization_UnitTests.cpp.

◆ depSheetIn

RCP< DependencySheet > Teuchos::depSheetIn = rcp(new DependencySheet)

Definition at line 305 of file Condition_Serialization_UnitTests.cpp.

◆ double1Vali

RCP<EnhancedNumberValidator<double> > Teuchos::double1Vali
Initial value:
=
rcp(new EnhancedNumberValidator<double>(0,10))
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...

Definition at line 720 of file Dependencies_SerializationTests.cpp.

◆ double2Vali

RCP<EnhancedNumberValidator<double> > Teuchos::double2Vali
Initial value:
=
rcp(new EnhancedNumberValidator<double>(0,30))
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...

Definition at line 723 of file Dependencies_SerializationTests.cpp.

◆ EDiagChar

const char Teuchos::EDiagChar = {'U' , 'N' }

Definition at line 69 of file Teuchos_BLAS.cpp.

◆ entryIDsMap

Teuchos::entryIDsMap[dependeeParam] = 1

Definition at line 1085 of file Dependencies_SerializationTests.cpp.

◆ ESideChar

const char Teuchos::ESideChar = {'L' , 'R' }

Definition at line 66 of file Teuchos_BLAS.cpp.

◆ ETranspChar

const char Teuchos::ETranspChar = {'N' , 'T' , 'C' }

Definition at line 67 of file Teuchos_BLAS.cpp.

◆ ETypeChar

const char Teuchos::ETypeChar = {'G' , 'L', 'U', 'H', 'B', 'Q', 'Z' }

Definition at line 70 of file Teuchos_BLAS.cpp.

◆ EUploChar

const char Teuchos::EUploChar = {'U' , 'L' }

Definition at line 68 of file Teuchos_BLAS.cpp.

◆ flt_nan

TEUCHOSCORE_LIB_DLL_EXPORT const float Teuchos::flt_nan = +returnFloatZero()/returnFloatZero()

Definition at line 122 of file Teuchos_ScalarTraits.cpp.

◆ g_arraySize

const int Teuchos::g_arraySize = 5

Definition at line 63 of file ParameterList_SerializationTest.cpp.

◆ gmp_rng

gmp_randclass Teuchos::gmp_rng

◆ long

std::complex< double > std::complex< double > double Teuchos::long

Definition at line 78 of file Teuchos_PromotionTraits.hpp.

◆ myDepList

ParameterList Teuchos::myDepList("String Vali Dep List") ( "Condition Visual Dep List"  )

◆ myDepSheet

RCP< DependencySheet > Teuchos::myDepSheet = rcp(new DependencySheet)

Definition at line 433 of file Dependencies_SerializationTests.cpp.

◆ notCon

RCP<NotCondition> Teuchos::notCon = rcp(new NotCondition(boolCon1))

Definition at line 351 of file Condition_Serialization_UnitTests.cpp.

◆ notConDep

RCP<ConditionVisualDependency> Teuchos::notConDep
Initial value:
=
rcp(new ConditionVisualDependency(
ParameterList testList("Condition Test List")
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
RCP< NotCondition > notCon
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...

Definition at line 353 of file Condition_Serialization_UnitTests.cpp.

◆ NotConditionSerialization

Teuchos::NotConditionSerialization
Initial value:
{
ConditionXMLConverterDB::printKnownConverters(out)

Definition at line 338 of file Condition_Serialization_UnitTests.cpp.

◆ numberCon

RCP<NumberCondition<int> > Teuchos::numberCon
Initial value:
=
rcp(new NumberCondition<int>(myDepList.getEntryRCP(dependee3)))
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
ParameterList myDepList("String Vali Dep List")

Definition at line 450 of file Dependencies_SerializationTests.cpp.

◆ ObjectType_name

const std::string Teuchos::ObjectType_name = "Foo Type"

Definition at line 50 of file ObjectBuilder_UnitTests.cpp.

◆ paramName1

std::string Teuchos::paramName1 = "bool param1"

Definition at line 277 of file Condition_Serialization_UnitTests.cpp.

◆ paramName2

std::string Teuchos::paramName2 = "bool param2"

Definition at line 278 of file Condition_Serialization_UnitTests.cpp.

◆ paramValue1

bool Teuchos::paramValue1 = true

Definition at line 280 of file Condition_Serialization_UnitTests.cpp.

◆ paramValue2

bool Teuchos::paramValue2 = false

Definition at line 281 of file Condition_Serialization_UnitTests.cpp.

◆ plWriter

XMLParameterListWriter Teuchos::plWriter

Definition at line 478 of file Dependencies_SerializationTests.cpp.

◆ readInCon

RCP< const NotCondition > Teuchos::readInCon
Initial value:
=
rcp_dynamic_cast<const BinCondition >(readInDep1->getCondition(), true)
RCP< ConditionVisualDependency > readInDep1
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.

Definition at line 322 of file Condition_Serialization_UnitTests.cpp.

◆ readInConList

Condition::ConstConditionList Teuchos::readInConList = readInCon->getConditions()

Definition at line 326 of file Condition_Serialization_UnitTests.cpp.

◆ readInDep1

RCP< ConditionVisualDependency > Teuchos::readInDep1
Initial value:
=
rcp_dynamic_cast<ConditionVisualDependency>(
*(depSheetIn->getDependenciesForParameter(readInDependee1)->begin()))
RCP< DependencySheet > depSheetIn
RCP< ParameterEntry > readInDependee1
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.

Definition at line 312 of file Condition_Serialization_UnitTests.cpp.

◆ readinDep1

RCP< Dependency > Teuchos::readinDep1
Initial value:
=
*(readInDepSheet->getDependenciesForParameter(readinDependee1)->begin())
RCP< ParameterEntry > readinDependee1
RCP< DependencySheet > readInDepSheet

Definition at line 492 of file Dependencies_SerializationTests.cpp.

◆ readInDep2

RCP<ConditionVisualDependency> Teuchos::readInDep2
Initial value:
=
rcp_dynamic_cast<ConditionVisualDependency>(
*(depSheetIn->getDependenciesForParameter(readInDependee1)->begin()))
RCP< DependencySheet > depSheetIn
RCP< ParameterEntry > readInDependee1
RCP< T2 > rcp_dynamic_cast(const RCP< T1 > &p1, bool throw_on_fail=false)
Dynamic cast of underlying RCP type from T1* to T2*.

Definition at line 315 of file Condition_Serialization_UnitTests.cpp.

◆ readinDep2

RCP< Dependency > Teuchos::readinDep2
Initial value:
=
*(readInDepSheet->getDependenciesForParameter(readinDependee2)->begin())
RCP< DependencySheet > readInDepSheet
RCP< ParameterEntry > readinDependee2

Definition at line 495 of file Dependencies_SerializationTests.cpp.

◆ readinDep3

RCP<Dependency> Teuchos::readinDep3
Initial value:
=
*(readInDepSheet->getDependenciesForParameter(readinDependee3)->begin())
RCP< ParameterEntry > readinDependee3
RCP< DependencySheet > readInDepSheet

Definition at line 498 of file Dependencies_SerializationTests.cpp.

◆ readInDependee1

RCP< ParameterEntry > Teuchos::readInDependee1 = readinList->getEntryRCP(paramName1)

Definition at line 309 of file Condition_Serialization_UnitTests.cpp.

◆ readinDependee1

RCP< ParameterEntry > Teuchos::readinDependee1 = readInList->getEntryRCP(dependee1)

Definition at line 485 of file Dependencies_SerializationTests.cpp.

◆ readInDependee2

RCP<ParameterEntry> Teuchos::readInDependee2 = readinList->getEntryRCP(paramName2)

Definition at line 310 of file Condition_Serialization_UnitTests.cpp.

◆ readinDependee2

RCP< ParameterEntry > Teuchos::readinDependee2 = readInList->getEntryRCP(dependee2)

Definition at line 487 of file Dependencies_SerializationTests.cpp.

◆ readinDependee3

RCP<ParameterEntry> Teuchos::readinDependee3 = readInList->getEntryRCP(dependee3)

Definition at line 489 of file Dependencies_SerializationTests.cpp.

◆ readinDependent1

RCP< ParameterEntry > Teuchos::readinDependent1 = readInList->getEntryRCP(dependent1)

Definition at line 486 of file Dependencies_SerializationTests.cpp.

◆ readinDependent2

RCP< ParameterEntry > Teuchos::readinDependent2 = readInList->getEntryRCP(dependent2)

Definition at line 488 of file Dependencies_SerializationTests.cpp.

◆ readinDependent3

RCP<ParameterEntry> Teuchos::readinDependent3 = readInList->getEntryRCP(dependent3)

Definition at line 490 of file Dependencies_SerializationTests.cpp.

◆ readInDepSheet

RCP< DependencySheet > Teuchos::readInDepSheet = rcp(new DependencySheet)

Definition at line 476 of file Dependencies_SerializationTests.cpp.

◆ readinList

RCP< ParameterList > Teuchos::readinList
Initial value:
=
RCP< DependencySheet > depSheet1
RCP< DependencySheet > depSheetIn
ParameterList testList("Condition Test List")
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...

Definition at line 306 of file Condition_Serialization_UnitTests.cpp.

◆ readInList

out<< xmlOut.toString(); RCP<ParameterList> Teuchos::readInList
Initial value:
=
RCP< DependencySheet > myDepSheet
RCP< DependencySheet > readInDepSheet
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...
ParameterList myDepList("String Vali Dep List")

Definition at line 482 of file Dependencies_SerializationTests.cpp.

◆ simpleConVisDep

RCP<ConditionVisualDependency> Teuchos::simpleConVisDep
Initial value:
= rcp(
new ConditionVisualDependency(
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
RCP< StringCondition > stringCon
ParameterList myDepList("String Vali Dep List")

Definition at line 458 of file Dependencies_SerializationTests.cpp.

◆ stringCon

RCP<StringCondition> Teuchos::stringCon
Initial value:
=
rcp(new StringCondition(
RCP< ParameterEntry > getEntryRCP(const std::string &name)
Retrieves the RCP for an entry with the name name if it exists.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
StringCondition::ValueList conditionVal1
ParameterList myDepList("String Vali Dep List")

Definition at line 443 of file Dependencies_SerializationTests.cpp.

◆ StringValidatorDepSerialization

Teuchos::StringValidatorDepSerialization
Initial value:
{
std::string dependee1 = "string param"

Definition at line 708 of file Dependencies_SerializationTests.cpp.

◆ testList

ParameterList Teuchos::testList("Condition Test List") ( "Condition Test List"  )

◆ validatorIDsMap

ValidatortoIDMap Teuchos::validatorIDsMap

Definition at line 1087 of file Dependencies_SerializationTests.cpp.

◆ valuesAndValidators

Teuchos::valuesAndValidators["val2"] = double1Vali

Definition at line 729 of file Dependencies_SerializationTests.cpp.

◆ xmlOut

XMLObject Teuchos::xmlOut = plWriter.toXML(myDepList, myDepSheet)

Definition at line 479 of file Dependencies_SerializationTests.cpp.